sql
stringlengths
6
1.05M
<reponame>modfin/tap CREATE OR REPLACE FUNCTION tap_aroonosc(_interval INT, _instrument_id BIGINT, _from DATE, _to DATE) RETURNS TABLE("close_date" DATE, aroonosc DOUBLE PRECISION) LANGUAGE plpgsql AS $$ DECLARE BEGIN RETURN QUERY SELECT a.close_date, a.up - a.down aroonosc FROM tap_aroon(_inter...
begin execute immediate q'[ create type oracle_tools.t_type_method_object authid current_user under oracle_tools.t_member_object ( /* From USER_TYPE_METHODS: Used for non-inherited methods only. USER_TYPE_METHODS.METHOD_NAME is mapped to MEMBER_NAME. USER_TYPE_METHODS.METHOD_NO is mapped to MEMBER#. Colu...
CREATE TABLE IF NOT EXISTS issue ( id UUID, title TEXT NOT NULL, created_at TIMESTAMP NOT NULL, url TEXT NOT NULL, closed BOOLEAN NOT NULL, closed_at TIMESTAMP, repository_id UUID NOT NULL, PRIMARY KEY (id), FOREIGN KEY (repository_id) REFER...
create index IX_94A7EF25 on Marketplace_App (category); create index IX_865B7BD5 on Marketplace_App (companyId); create index IX_20F14D93 on Marketplace_App (remoteAppId); create index IX_3E667FE1 on Marketplace_App (uuid_); create index IX_A7807DA7 on Marketplace_App (uuid_, companyId); create index IX_7DC16D26 on Ma...
<reponame>cmarshall10450/neo4j-demo LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/cmarshall10450/neo4j-demo/master/ratings.csv" AS row MATCH (user:User { id: toInt(row.user_id) }), (movie:Movie { id: toInt(row.movie_id) }) MERGE (user)-[:RATED {rating: toInt(row.score)}]->(movie) RETURN user, movie
CREATE TABLE {wp_prefix}wpda_project_page{wpda_postfix} ( project_id mediumint(9) NOT NULL , page_id mediumint(9) NOT NULL AUTO_INCREMENT , page_name varchar(100) NOT NULL , add_to_menu enum('Yes','No') DEFAULT NULL , page_type enum('table','parent/child','static') NOT NULL , page_schema_name varchar(64) NOT NULL DEFAU...
<gh_stars>0 -- CreateAuthors.sql -- Creates the Authors table. -- Data Analysis with Java -- <NAME> -- May 4 2017 create table Authors ( id char(8) primary key, lastName varchar(16), firstName varchar(16), yob int )
--start query 4 using template query4.tpl -- @private, @condition(customer) WITH year_total AS ( SELECT c_customer_id customer_id ,c_first_name customer_first_name ,c_last_name customer_last_name ,c_preferred_cust_flag customer_preferred_cust_flag ...
<filename>source/org.ohdsi.cdm.framework.etl/org.ohdsi.cdm.framework.etl.hcup/ETL/HCUP/Lookups/PR.sql SELECT distinct REPLACE(icd9.concept_code, '.', '') AS source_code, standard.concept_id AS target_concept_id, standard.domain_id as TARGET_DOMAIN_ID, null as VALID_START_DATE, null as VALID_END_DATE, null as SOURCE_VO...
<reponame>tenaciousRas/Openfire<gh_stars>1000+ set @exist := (select count(*) from information_schema.statistics where table_name = 'ofMucConversationLog' and index_name = 'ofMucConvLog_msg_id' and table_schema = database()); set @sqlstmt := if( @exist > 0, 'select ''INFO: Index already exists.''', 'create index ofMuc...
{{ config( materialized='table', backup=False, sort='sortkey' ) }} select 1 as sortkey
-- -- OpenAPI Petstore. -- Prepared SQL queries for 'Animal' definition. -- -- -- SELECT template for table `Animal` -- SELECT `className`, `color` FROM `Animal` WHERE 1; -- -- INSERT template for table `Animal` -- INSERT INTO `Animal`(`className`, `color`) VALUES (?, ?); -- -- UPDATE template for table `Animal` --...
CREATE TABLE IF NOT EXISTS `kwc_events` ( `id` int(11) NOT NULL auto_increment, `start_date` datetime NOT NULL, `end_date` datetime default NULL, `place` varchar(200) collate utf8_unicode_ci NOT NULL, `component_id` varchar(200) collate utf8_unicode_ci NOT NULL, `title` varchar(255) collate utf8_unicode_ci ...
<reponame>WitalijBukatkin/AutoTerminal -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: AutoTerminal -- ------------------------------------------------------ -- Server version 5.6.38 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CH...
<reponame>cryptojew/ExLibris -- ******************************************************************************************* -- DML - Data manipulation language -- Faz os inserts de registros de base no banco de dados - tabelas tradicionais -- **************************************************************************...
-- https://eduardolegatti.blogspot.com/2014/01/movendo-tabelas-indices-e-segmentos-lob.html set timing on SELECT 'alter table "' || t.owner || '"."' || t.table_name || '" move lob (' || column_name || ') store as (tablespace PSAPSR3_LOB);' CMD FROM dba_lobs l, dba_tables t WHERE l.owner = t.o...
USE [DFC-UserAccounts] GO /****** Object: Table [dbo].[Accounts] Script Date: 08/05/2019 10:52:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Accounts]( [Name] [nvarchar](500) NOT NULL, [sfaProviderUserType] [nvarchar](100) NULL, [A1LifecycleState] [nvarchar](50) NULL, [UPIN] [...
<filename>undergrad/dbscratch/learn-db/data/search_keyword.sql select homework_id , homework_no::int as homework_no from ct_homework as t1 where lesson_tokens @@ 'insert' order by homework_no asc ;
-- ------------------------------------------------------ -- ADD SOME MODIFY + CREATE TIMESTAMPS -- ------------------------------------------------------ ALTER TABLE haikudepot.pkg_version_localization ADD COLUMN modify_timestamp TIMESTAMP; ALTER TABLE haikudepot.pkg_version_localization ADD COLUMN create_timestamp T...
<gh_stars>1-10 -- DO NOT RUN BLINDLY, CREATED FOR A SPECIFIC SITUATION -- This script can regenrate the emails for CiviCRM to process -- In the case this script was create, CiviCRM was ignoring all emails because the headers from Mailgun call backs were not being decoded properly. -- @author: <NAME> <<EMAIL>> -- Previ...
<filename>scripts/reports/data_only_header.sql set serveroutput on size unlimited verify off timing off feedback off linesize 32000 pagesize 0 heading off long 2000000 autotrace off newpage none termout on trimspool on
<filename>abcsql-main/examples/recipes/offdb/recipestep.sql DROP TABLE IF EXISTS recipestep; CREATE TABLE recipestep ( recipeid integer, step integer, minutes integer, stepdescription text, stepname text ); INSERT INTO recipestep (recipeid, step, minutes, stepdescription, stepname) VALUES (1, 1, 0, "Oljan o...
<reponame>BugsUK/FindApprenticeship CREATE PROCEDURE [dbo].[uspGetEducationResultByCandidateId] @candidateId int AS BEGIN SET NOCOUNT ON SELECT [educationResult].[CandidateId] AS 'CandidateId', [educationResult].[DateAchieved] AS 'DateAchieved', [educationResult].[EducationResultId] AS 'EducationResultId', ...
<gh_stars>1-10 DROP DATABASE IF EXISTS tracker_db; CREATE DATABASE tracker_db; USE tracker_db; CREATE TABLE department ( id INT AUTO_INCREMENT NOT NULL, name VARCHAR(30) NOT NULL, PRIMARY KEY(id) ); CREATE TABLE role ( id INT AUTO_INCREMENT NOT NULL, title VARCHAR(30) NOT NULL, salary DECIMA...
<reponame>CSCfi/antero ALTER PROCEDURE [dw].[p_lataa_d_yo_toimipisteen_toimipaikka] AS IF ( SELECT count(1) FROM dw.d_yo_toimipisteen_toimipaikka WHERE koodi_yliopisto = '-1' ) = 0 BEGIN TRUNCATE TABLE dw.d_yo_toimipisteen_toimipaikka set identity_insert dw.d_yo_toimipisteen_toimipaikka on INSERT dw.d_yo_toi...
<gh_stars>10-100 insert into sys_menu values ('Url_OrderMstr_Production_ItemView','整车生产单查询','Url_OrderMstr_Production',102,'整车生产单查询','~/ProductionOrder/ItemIndex','~/Content/Images/Nav/Default.png',1) if not exists(select * from acc_permission where code='Url_OrderMstr_Production_ItemView') insert into acc_permissio...
-- Revert seattleflu/schema:receiving/sequence-read-set/indexes/processing-log from pg begin; drop index receiving.sequence_read_set_processing_log_idx; commit;
INSERT INTO department_table (dept_name) VALUES ("Sales"), ("Engineering"), ("Finance"), ("Legal"); INSERT INTO role_table (title, salary, department_id) VALUES ("Sales Lead", 100000, 1), ("Salesperson", 85000, 1), ("Lead Engineer", 160000, 2), ("Software Engineer", 120000, 2),...
<reponame>webguru071/Django-Online-Book-Store<gh_stars>1-10 delimeter// create procedure get_books(IN type varchar(20), IN lefttable varchar(15),IN jointable varchar(20), IN jointype varchar(10),IN onleft varchar(10), IN onright varchar(20),In tocompare varchar(20)) begin set @fromjoin = lefttable set @tojoin = join...
-------- -- Up -------- -- Notes: -- - Have to remember to cast to text when extracting bigint ids, due to JS numbers -- - No foreign key constraints to explicitly allow for dangling refs -- - Not all tweets will be fetched/saved -- - Not all users will have full details when encountered -- - Can convert time...
TRUNCATE table pms_payment_pre; TRUNCATE table pms_payment_after; TRUNCATE table pms_device_detail_payment; UPDATE pms_device_detail SET income_money =0; TRUNCATE table pms_device_detail; TRUNCATE table pms_device; TRUNCATE table pms_house; TRUNCATE table pms_unit; TRUNCATE table pms_buildings; TRU...
#standardSQL # 09_32: Sites properly using alt tags (or role=none and role=presentation) on image and button image elements SELECT COUNT(0) AS total_sites, COUNTIF(uses_any_images) AS total_using_any_images, COUNTIF(uses_img_elements) AS total_using_img_elements, COUNTIF(uses_input_img_elements) AS total_using_...
select count(*) from ( select count(*) as total from orders WHERE o_orderkey > 0 union select count(*) as total from customer WHERE c_custkey > 0 ) table1;
-- Harvested from a mod-calendar 1.12.0 -- C is a correct/normal calendar -- B is a calendar with completely invalid regular_hours JSON -- 0 is a calendar with improper start/end dates INSERT INTO "test_mod_calendar"."openings" ("id", "jsonb", "creation_date", "created_by") VALUES ( 'cccccccc-cccc-cccc-cccc-ccc...
ALTER TABLE `amazon_node_pools` ADD COLUMN `stack_id` VARCHAR(255);
ALTER TABLE ONLY log ALTER COLUMN logid SET DEFAULT nextval('log_seq'::regclass); ALTER TABLE log add column workspaceid int; DROP TABLE log_workspace; ALTER TABLE datasource add column username varchar(64); ALTER TABLE datasource add column password varchar(64);
<filename>software/cabio-database/scripts/ddl/Tables/PROTEIN_COMPLEX.sql /*L Copyright SAIC Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cabio/LICENSE.txt for details. L*/ ALTER TABLE PROTEIN_COMPLEX DROP PRIMARY KEY CASCADE / DROP TABLE PROTEIN_COMPLEX CASCADE CONSTRA...
-- { -- -- Return random TIDs in a table. -- -- You can use like this: -- -- SELECT * FROM lots_of_points WHERE ctid = ANY ( -- ARRAY[ (SELECT CDB_RandomTids('lots_of_points', 100000)) ] -- ); -- -- NOTE: -- It currently doesn't really do it random, but in a -- equally-distributed way among all tuples. -- --...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 19, 2021 at 12:40 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 16, 2020 at 07:58 AM -- Server version: 5.7.24 -- PHP Version: 7.2.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
SELECT EmployeeID ,LastName FROM Employees WHERE LastName LIKE 'D%'; SELECT EmployeeID ,LastName FROM Employees WHERE LastName LIKE '%an'; SELECT EmployeeID ,LastName FROM Employees WHERE LastName LIKE '_a%';
<gh_stars>0 SELECT (salary * months) as earnings, COUNT(*) FROM employee GROUP BY 1 ORDER BY earnings DESC LIMIT 1
<reponame>Saba-d-coder/5th-Sem declare vssn emp.ssn%type; begin vssn:=&ssn; delete from emp where ssn=vssn; end; /
CREATE TABLE list (id VARCHAR(64) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "list" ("id", "value") VALUES (E'AF', E'Afganistan'); INSERT INTO "list" ("id", "value") VALUES (E'AX', E'Alandy'); INSERT INTO "list" ("id", "value") VALUES (E'AL', E'Albánsko'); INSERT INTO "list" ("id", "value") VA...
CREATE TABLE IF NOT EXISTS deployment_progress ( dpg_id SERIAL PRIMARY KEY, dpl_id INTEGER REFERENCES deployments(dpl_id) ON DELETE CASCADE NOT NULL, insert_date TIMESTAMP NOT NULL DEFAULT now(), update_date TIMESTAMP NOT NULL DEFAULT now(), UNIQUE(dpl_id) ); COMMENT ON COLUMN deployment_progress.d...
-- CreateTable CREATE TABLE "refresh_token" ( "id" TEXT NOT NULL, "expireIn" INTEGER NOT NULL, "userId" TEXT NOT NULL, PRIMARY KEY ("id") ); -- CreateIndex CREATE UNIQUE INDEX "refresh_token_userId_unique" ON "refresh_token"("userId"); -- AddForeignKey ALTER TABLE "refresh_token" ADD FOREIGN KEY ("us...
<filename>bigquery/example/appengine-request-log-protoPayload-line-read-udf/read-protoPayload.line.sql #standardSQL CREATE TEMPORARY FUNCTION GetQueueStats( lines_json STRING) RETURNS STRUCT<email STRING, executed1Minute FLOAT64> LANGUAGE js AS """ var lines = JSON.parse(lines_json); var result = { email : '', ...
<gh_stars>100-1000 ALTER TABLE `events_event` ADD COLUMN `event_publicly_visible` BOOLEAN DEFAULT FALSE AFTER `event_grpid`;
<reponame>dram/metasfresh<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5475430_sys_gh2826-orderline-group-discount-fields-webui.sql -- 2017-10-25T11:38:42.407 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_C...
<gh_stars>100-1000 -- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, -- and the EPL 1.0 (http://h2database.com/html/license.html). -- Initial Developer: H2 Group -- create table test(a int primary key, b int references(a)); > ok merge into test values(1, 2); > exception REFERENTIAL_INTEGRITY_VIOLA...
with validation_errors as ( select task_id, user_id from `dbt-package-testing`.`asana`.`task_follower` group by task_id, user_id having count(*) > 1 ) select count(*) from validation_errors
use thinkphp; /*创建事务表*/ CREATE TABLE `things` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `contents` text COLLATE utf8_unicode_ci NOT NULL, `time` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
select id, (exterior -> 'uid') as "uid", (exterior -> 'name') as "name" from c_partner;
<reponame>smanousopoulos/daiad-web<filename>src/main/resources/db/migration/daiad/V1_0_74__Load_recommendation_template_translation.sql<gh_stars>1-10 TRUNCATE TABLE public.recommendation_template_translation; -- -- Load public.recommendation_template_translation -- INSERT INTO public.recommendation_template_transl...
------------------------------------------------------------------------------- -- task def base ------------------------------------------------------------------------------- CREATE TABLE TASK_DEF_BASE( ID BIGINT NOT NULL, CODE VARCHAR(100), NAME VARCHAR(200), PROCESS_DEFINITION_ID VARCHAR(200), FORM_KEY VARC...
ALTER AGGREGATE myavg(integer) RENAME TO my_average;
CPPFLAGS += -I/usr/local/pgsql/include
<reponame>agungdhewe/oss -- SET FOREIGN_KEY_CHECKS=0; -- drop table if exists `mst_coamodel`; CREATE TABLE `mst_coamodel` ( `coamodel_id` varchar(10) NOT NULL , `coamodel_name` varchar(90) NOT NULL , `coamodel_isdisabled` tinyint(1) NOT NULL DEFAULT 0, `coamodel_isaging` tinyint(1) NOT NULL DEFAULT 0...
-- @testpoint: 时间和日期操作符+,timestamp不带时区相加 drop table if exists test_date01; create table test_date01 (col1 timestamp without time zone); insert into test_date01 values ('2003-04-12 04:59:00'); select col1 + time '19:01' from test_date01; drop table if exists test_date01;
SELECT `user_name`, SUBSTRING(`email`, LOCATE('@', `email`) + 1) AS 'Email Provider' FROM `users` ORDER BY `Email Provider`, `user_name`;
INSERT INTO burgers (burger_name) VALUES ('Buttburn'); INSERT INTO burgers (burger_name) VALUES ('Ninjaface'); INSERT INTO burgers (burger_name, devoured) VALUES ('Rocky Road', true); INSERT INTO burgers (burger_name, devoured) VALUES ('Gut Buster', true); INSERT INTO burgers (burger_name, devoured) VALUES ('Smelly bur...
/* SQLyog Ultimate v12.09 (64 bit) MySQL - 10.4.14-MariaDB : Database - imaging ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_K...
update census_daystats set sdate = sdate + ((select min(current_date - sdate) from census_daystats) - 1) ;
CREATE OR REPLACE FUNCTION DAY(a_date IN DATE) RETURN NUMBER IS BEGIN RETURN EXTRACT(DAY FROM a_date); END;
-- Insert into Languages USE [BorderlessDb] GO DELETE FROM Votes; DELETE FROM Translations; DELETE FROM Phrases; DELETE FROM TargetLanguages; DELETE FROM Projects; DELETE FROM Languages; DELETE FROM Users; INSERT INTO [Languages] ([ID] ,[Name] ,[Abbreviation]) VALUES (NEWID(), '(Afan) Oromo', 'om'), (NEWID(), 'Abkha...
-- This query checks if the patient had AKI during the first 48 hours of their ICU -- stay according to the KDIGO guideline. -- https://kdigo.org/wp-content/uploads/2016/10/KDIGO-2012-AKI-Guideline-English.pdf -- get the worst staging of creatinine in the first 48 hours CREATE OR REPLACE TABLE `aki-recovery-prediction...
<reponame>AlbertEdward/softuni-windows SELECT c.LastName, AVG(s.[Length]) AS CigarLength, CEILING(AVG(s.RingRange)) AS CigarRingRange FROM Clients AS c JOIN ClientsCigars AS cc ON c.Id = cc.ClientId JOIN Cigars AS cg ON cc.CigarId = cg.Id JOIN Sizes AS s ON cg.SizeId = s.Id GROUP BY c.LastName ORDER BY CigarLength DE...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 07, 2017 at 08:20 AM -- Server version: 10.1.16-MariaDB -- PHP Version: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
DELETE FROM server_players WHERE server_id IN (SELECT id from game_servers WHERE alias = ?1);
<gh_stars>10-100 -- file:arrays.sql ln:542 expect:true select string_to_array('abc', ',', 'abc')
-- /* * What database should I use for these exercises? * Name: Employees */ -- -- Question 1: What is the average salary for the company? -- Table: Salaries -- Result: 63810.744836143706 select avg(salary) from salaries; -- Question 2: What year was the youngest person born in the company? -- Table: employees...
<filename>macros/get_feedback_form_field_columns.sql {% macro get_feedback_form_field_columns() %} {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()}, {"name": "code_language", "datatype": dbt_utils.type_string()}, {"name": "currency", "datatype": dbt_utils.type_string(...
<filename>mnis/web/src/main/resources/dbscript/sqlserver_drop_with_disabled_constraint.sql -- 以下ddl语句由下面三条select语句生成 SELECT 'ALTER TABLE ' + name + ' NOCHECK CONSTRAINT ALL;' FROM sys.tables WHERE is_ms_shipped = 'False'; SELECT 'ALTER TABLE ' + name + ' DISABLE TRIGGER ALL;' FROM sys.tables WHERE is_ms_shipped = 'Fals...
<filename>src/Frapid.Web/Areas/MixERP.Finance/db/PostgreSQL/2.x/2.0/src/02.functions-and-logic/finance.create_routine.sql DROP FUNCTION IF EXISTS finance.create_routine(_routine_code national character varying(24), _routine regproc, _order integer); CREATE FUNCTION finance.create_routine(_routine_code national charac...
<reponame>spruceid/keylink -- Your SQL goes here CREATE TABLE keys ( user_id VARCHAR NOT NULL, name VARCHAR NOT NULL, jwk JSONB NOT NULL, created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (user_id, name) );
<gh_stars>1-10 /*L Copyright SAIC Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cabio/LICENSE.txt for details. L*/ create index ZSTG_PIDDUMP_FIELD6 on ZSTG_PID_DUMP(FIELD6) PARALLEL NOLOGGING tablespace CABIO_MAP_FUT; create index ZSTG_PIDDUMP_FIELD5 on ZSTG_PID_...
CREATE TABLE files ( id UUID PRIMARY KEY, created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT current_timestamp, updated TIMESTAMP WITH TIME ZONE, -- object_type TEXT, -- object_id UUID, label TEXT, file_type TEXT, filename TEXT, url TEXT, mime_type TEXT, size INTEGER, type...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 15, 2021 at 08:18 AM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
-- schema for the users database CREATE TABLE users ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL UNIQUE, password_hash TEXT NOT NULL, -- UNIX timestamp in milliseconds registered_at INTEGER NOT NULL, registration_ip TEXT NOT NULL ); CREATE TABLE tokens ( user_id INTEGER NOT N...
INSERT INTO burgers (name) VALUES ('Avocado Burger'); INSERT INTO burgers (name) VALUES ('Mushroom Burger'); INSERT INTO burgers (name, eaten) VALUES ('Bacon Burger', true); INSERT INTO burgers (name, eaten) VALUES ('Double Cheese Burger', true);
<filename>taskzi/backup/taskpro_db2016-11-18.sql # # TABLE STRUCTURE FOR: categoriespost # DROP TABLE IF EXISTS `categoriespost`; CREATE TABLE `categoriespost` ( `categories_id` int(11) NOT NULL AUTO_INCREMENT, `kategories_title` varchar(100) NOT NULL, `kategories_description` text, PRIMARY KEY (`categories_i...
<reponame>adminiitbact/cov2-graphql<filename>hasura/migrations/1589398861816_set_fk_public_patient_clinical_history_facility/down.sql<gh_stars>0 alter table "public"."patient_clinical_history" drop constraint "patient_clinical_history_facility_fkey";
<reponame>jaanos/OPB-umetnine INSERT INTO stili (id, stil) VALUES ('0', 'painting'); INSERT INTO stili (id, stil) VALUES ('1', 'ceramics'); INSERT INTO stili (id, stil) VALUES ('2', 'sculpture'); INSERT INTO stili (id, stil) VALUES ('3', 'graphics'); INSERT INTO stili (id, stil) VALUES ('4', 'architecture'); INSERT INT...
<gh_stars>0 -- -- PostgreSQL database dump -- -- Dumped from database version 9.6.10 -- Dumped by pg_dump version 9.6.10 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('searc...
<gh_stars>0 ALTER TABLE user ADD editor_mode varchar(16) DEFAULT '' NOT NULL; ALTER TABLE user ADD md_theme varchar(32) DEFAULT '' NOT NULL; ALTER TABLE user ADD signature varchar(255) DEFAULT '' NOT NULL;
<gh_stars>0 -- Table: public.professor DROP TABLE IF EXISTS public.professor; CREATE TABLE IF NOT EXISTS public.professor ( cod_professor integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), nome_professor character varying(20) COLLATE pg_catalog."defau...
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: 02 Iul 2019 la 20:27 -- Versiune server: 5.7.26-0ubuntu0.19.04.1 -- PHP Version: 7.2.19-0ubuntu0.19.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `store` -...
<filename>liquibase/src/main/resources/cassandra/db/changelog/init/ddl/02_create_indexes.sql --liquibase formatted sql --changeset <NAME>:db-init CREATE INDEX ON cookbook.recipes(rating); CREATE INDEX ON cookbook.recipes(category); CREATE INDEX ON cookbook.measurement_units(is_imperial); CREATE INDEX ON cookbook.meas...
<reponame>Sleeya/DatabasesBasics-MSSQL-Server USE SoftUni SELECT FirstName FROM Employees WHERE (DATEPART(YEAR,HireDate) BETWEEN 1995 AND 2005) AND DepartmentId IN (3,10)
<gh_stars>1-10 select sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) store_only ,sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) catalog_only ,sum(case when ssci.customer_sk is not null and csci.customer_sk is not null th...
-- file:union.sql ln:33 expect:true SELECT 1.0::float8 AS two UNION ALL SELECT 1 ORDER BY 1
<reponame>Shuttl-Tech/antlr_psql -- file:foreign_data.sql ln:212 expect:true DROP SERVER s3
<filename>sqllinuxbook/ch5/dm_os_sys_info.sql SELECT cpu_count, hyperthread_ratio, physical_memory_kb, committed_kb, committed_target_kb, max_workers_count, datediff(hour, sqlserver_start_time, getdate()) as sql_up_time_hours, affinity_type_desc, virtual_machine_type_desc, softnuma_configuration_desc, socket_count, cor...
<reponame>dram/metasfresh<filename>backend/de.metas.dlm/base/src/main/sql/postgresql/ddl/dlm/functions/add_table_to_dlm.sql CREATE OR REPLACE FUNCTION dlm.add_table_to_dlm(p_table_name text) RETURNS void AS $BODY$ DECLARE v_trigger_view_row dlm.triggers; BEGIN BEGIN /* using smallint, see https://www.postgresql....
DELIMITER / ALTER TABLE INV_COI_DISC_DETAILS ADD CONSTRAINT UQ_INV_COI_DISC_DETAILS UNIQUE (COI_DISCLOSURE_NUMBER, ENTITY_NUMBER, ENTITY_SEQUENCE_NUMBER, SEQUENCE_NUMBER) / DELIMITER ;
<reponame>n-okonek/foolery -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: glazpmck_ics370 -- ------------------------------------------------------ -- Server version 8.0.19 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_S...
<reponame>Sercomm-Demeter-group/lcmdemeter<filename>openfire.plugin.demeter_core/src/database/upgrade/4/demeter_core_mysql.sql ALTER TABLE `sAppVersion` ADD `status` TINYINT UNSIGNED NOT NULL DEFAULT '1' COMMENT '0:disable, 1:enable' AFTER `version`, ADD INDEX `STATUS` (`status`); UPDATE `ofVersion` SET version=4 WHER...
<reponame>nenadnoveljic/tpt-oracle -- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. SET ECHO ON -- ALTER SESSION SET "_serial_direct_read"=ALWAYS; -- ALTER SESSION SET "_cell_storidx_mode"=EVA; ...
<reponame>jazzlian/hobby create tablespace users datafile '/data/ORCL/useres01.dbf' size 100M autoextend on next 10M;
<reponame>LasseWolter/clowdr alter table "chat"."Pin" drop constraint "Pin_attendeeId_fkey";