sql
stringlengths
6
1.05M
<reponame>tyrex-team/gmark WITH RECURSIVE c0(src, trg) AS ((SELECT s0.src, s3.trg FROM (SELECT trg as src, src as trg, label FROM edge) as s0, (SELECT trg as src, src as trg, label FROM edge) as s1, (SELECT trg as src, src as trg, label FROM edge) as s2, edge s3 WHERE s0.trg = s1.src AND s1.trg = s2.src AND s2.trg = s3...
create table if not exists topic_timelines ( id uuid primary key default gen_random_uuid(), topic_id uuid not null references topics(id) on delete cascade, starts_at timestamp with time zone, finishes_at timestamp with time zone, prefix_format varchar(20) not null default 'NONE' );
-- journal2.test -- -- execsql { PRAGMA journal_mode = truncate } PRAGMA journal_mode = truncate
<reponame>Shuttl-Tech/antlr_psql -- file:jsonb.sql ln:678 expect:true select * from jsonb_to_record('{"ia": [[1], [2, 3]]}') as x(ia _int4)
<gh_stars>10-100 -- file:create_index.sql ln:31 expect:true CREATE INDEX tenk2_unique2 ON tenk2 USING btree(unique2 int4_ops)
CREATE TABLE IF NOT EXISTS x.event_type ( event_type_id integer NOT NULL, event_type_name text COLLATE pg_catalog."default" ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE x.event_type OWNER to postgres; CREATE UNIQUE INDEX IF NOT EXISTS idx_event_type_id ON x.event_type USING btree ...
<gh_stars>0 DROP DATABASE IF EXISTS newsfeedblog_db; CREATE DATABASE newsfeedblog_db;
<reponame>smith750/kc INSERT INTO INSTITUTE_RATES (RATE_CLASS_CODE,RATE_TYPE_CODE,ACTIVITY_TYPE_CODE,FISCAL_YEAR,START_DATE,ON_OFF_CAMPUS_FLAG,UNIT_NUMBER,RATE,ACTIVE_FLAG,UPDATE_USER,UPDATE_TIMESTAMP,OBJ_ID,VER_NBR) VALUES ((SELECT RATE_CLASS_CODE FROM RATE_CLASS WHERE DESCRIPTION = 'MTDC'),(SELECT RATE_TYPE_CODE...
create table users( username varchar2(50) not null primary key, password varchar2(50) not null, enabled number(1) not null ); create table authorities ( username varchar2(50) not null, authority varchar2(50) not null, constraint fk_authorities_users foreign key(username) references us...
<filename>Student1.ParentPortal.Data/Scripts/edFi31/SQLServer/4SampleDataDemo.sql<gh_stars>0 IF (NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'ParentPortal')) BEGIN EXEC ('CREATE SCHEMA ParentPortal AUTHORIZATION [dbo]') END GO --Gets the nth occurrence of a given weekday in the month containing the specifie...
create database api; -- Bler; sort this out with something a little more explicit please (I hate leaving things in the hands of SQL Server) =) go begin transaction CREATE_API_DB set xact_abort on set transaction isolation level read committed use api if not exists (select * from sys.schemas where name = 'Authorisati...
-- Exported from QuickDBD: https://www.quickdatabasediagrams.com/ -- Link to schema: https://app.quickdatabasediagrams.com/#/d/xFQGgI -- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here. --Create titles table CREATE TABLE titles ( title_id VARCHAR(5) NOT NULL, title...
-- This is an additional query used for testing count-distinct aggregation. select l_returnflag, l_linestatus, count(distinct l_orderkey) as distinct_key from lineitem where l_shipdate <= date '1998-12-01' group by l_returnflag, l_linestatus order by l_returnflag, l_linestatus
--1. Написать запрос получение всех продуктов с типом "СЫР". select * from product as p inner join type as t on p.type_id = t.id where t.name = 'СЫР'; --2. Написать запрос получения всех продуктов, у кого в имени есть слово "мороженное". select * from product as p where p.name like '%мороженное%'; --3. Написать запро...
DROP TABLE IF EXISTS Multikey; CREATE TABLE Multikey ( Key1 INT AUTO_INCREMENT, Key2 NVARCHAR(50) NOT NULL, Value NVARCHAR(50), PRIMARY KEY(Key1, Key2) )
CREATE OR REPLACE PROCEDURE drop_detached_partitions(IN schema TEXT, IN archivisation_table TEXT) AS $$ DECLARE row record; BEGIN FOR row IN EXECUTE 'SELECT schemaname, tablename FROM ' || schema || '.' || archivisation_table || ' WHERE STATUS = ''DUMPED''' LOOP EXECUTE 'DROP...
ALTER TABLE pod_events ADD healthy text;
<gh_stars>0 -- Get the server informations for pg >= 11 -- NEW: pg_replication_slots WITH dbinfo AS( SELECT COALESCE(SUM(sd.xact_commit + sd.xact_rollback)::BIGINT, 0) AS xact_count, COALESCE(SUM(tup_inserted)::BIGINT, 0) AS insert, COALESCE(SUM(tup_updated)::BIGINT, 0) AS update, COALES...
/* Write a SQL query to get the second highest salary from the Employee table. +----+--------+ | Id | Salary | +----+--------+ | 1 | 100 | | 2 | 200 | | 3 | 300 | +----+--------+ For example, given the above Employee table, the query should return 200 as the second highest salary. If there is no second hig...
<reponame>FilanMaulaAndini/SIK.github.io -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 08, 2020 at 05:41 PM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.2.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SE...
<gh_stars>0 DECLARE @tent AS VARCHAR(255); SET @tent = ' _____________________' + CHAR(13) + ' / / \\ z' + CHAR(13) + ' / / \\ z' + CHAR(13) + ' / / \\ z' + CHAR(13) + '/ / \\ z' + CHAR(13) + '___________________/-...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Дек 19 2018 г., 10:18 -- Версия сервера: 5.7.23 -- Версия PHP: 7.0.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
-- ParkSpeciesSQL(iPark As Integer) [L135] SELECT tlu_Project_Taxa.Species_Code, tlu_Project_Taxa.Scientific_name, tlu_Project_Taxa.Layer, tlu_Layer.Layer_desc AS FxnGroup, tlu_Project_Taxa.Native, tlu_Nativity.Nativity_desc AS Nativity, tlu_Project_Taxa.Perennial, tlu_AnnualPerennial.AnnualPerennial_desc AS AnnPe...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: mysql -- Generation Time: Oct 17, 2018 at 01:22 PM -- Server version: 5.7.23 -- PHP Version: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
DROP TABLE IF EXISTS artikel; ; INSERT INTO artikel (`id_artikel`,`judul`,`judul_seo`,`isi`,`gambar`,`hari`,`tanggal`,`jam`,`id_user`,`kategori`,`tag`,`hits`) VALUES (20); INSERT INTO artikel (`id_artikel`,`judul`,`judul_seo`,`isi`,`gambar`,`hari`,`tanggal`,`jam`,`id_user`,`kategori`,`tag`,`hits`) VALUES (32); INSERT...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 27, 2020 at 05:10 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: eshop -- ------------------------------------------------------ -- Server version 5.7.17-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
<reponame>lushuyu/AquaSaying<filename>AquaSaying.sql -- MySQL dump 10.17 Distrib 10.3.15-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: AquaSaying -- ------------------------------------------------------ -- Server version 10.3.15-MariaDB-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 17, 2016 at 02:39 PM -- Server version: 5.6.26 -- PHP Version: 5.5.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
ALTER TABLE `SectionGroups` ADD COLUMN `TeachingAssistantAppointments` FLOAT NULL; ALTER TABLE `SectionGroups` ADD COLUMN `ReaderAppointments` FLOAT NULL;
<filename>sql/insert_alimentos.sql INSERT INTO alimentos(nome, porcao, calorias, cod_categoria) VALUES('Abacate', '1/2 pequeno (100 g)', 180, 1); INSERT INTO alimentos(nome, porcao, calorias, cod_categoria) VALUES('Abacaxi', '1 fatia grande (100 g)', 49, 1); INSERT INTO alimentos(nome, porcao, calorias, cod_categoria) ...
/* Notification Table ----------------------------------- @tablename _notifications @connection _auth_user @connection _auth_sessions @version 1.5.0-beta.1 */ CREATE TABLE `_notifications` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `sid` varchar(32) DEFAULT NULL, `uid` int(11...
<filename>src/test/resources/sql/create_table/00418a30.sql<gh_stars>10-100 -- file:rowtypes.sql ln:169 expect:true CREATE TABLE price ( id SERIAL PRIMARY KEY, active BOOLEAN NOT NULL, price NUMERIC )
INSERT INTO samply.configuration(name,setting,visible) VALUES ('DIRECTORY_URL','http://localhost:9999','true'); INSERT INTO samply.job_schedule(job_key, cron_expression, paused) VALUES ('DirectoryGroup.DirectorySyncJob', '0 0 3 ? * * *', false);
<gh_stars>0 ------------------------------ -- 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(255) NOT NULL ); DROP TABLE IF EXI...
-- Define the push_notification_tokens table CREATE TABLE push_notification_tokens ( id uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, user_id uuid NOT NULL REFERENCES users (id), token_source TEXT NOT NULL, token TEXT NOT NULL, last_notification_at TIMESTAMP NULL, created_at TIMESTAMP NOT NULL DEFAUL...
<reponame>bels/pantry<filename>migrations/location.sql -- 1 up CREATE TABLE location( id INTEGER PRIMARY KEY AUTOINCREMENT, genesis TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, modified TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, name TEXT NOT NULL, description TEXT, active BOOLEAN NOT NULL CHECK (active IN (0,1)) DEFA...
<filename>test/support/sql/users.sql -- public user role DROP USER IF EXISTS :PUBLICUSER; CREATE USER :PUBLICUSER WITH PASSWORD ':<PASSWORD>'; ALTER ROLE :PUBLICUSER SET search_path = :SEARCHPATH, cartodb; -- db owner role DROP USER IF EXISTS :TESTUSER; CREATE USER :TESTUSER WITH PASSWORD ':<PASSWORD>'; ALTER ROLE :TE...
<filename>openGaussBase/testcase/KEYWORDS/xmlconcat/Opengauss_Function_Keyword_Xmlconcat_Case0039.sql<gh_stars>0 -- @testpoint:关键字xmlconcat,用作函数名(合理报错) create function xmlconcat(num1 bigint,num2 bigint) return bigint as begin return num1+num2; end; / select * from xmlconcat(55555,666666);
CREATE PROCEDURE SP_VehiculosDeClientes_Delete @Matricula VARCHAR (9) AS BEGIN SELECT * FROM VehiculosDeClientes WHERE Matricula = @Matricula UPDATE VehiculosDeClientes SET Activo = 0 WHERE Matricula = Matricula END
<filename>GRA.Database/dbo/Stored Procedures/app_Event_GetUpcomingDisplay.sql  CREATE PROCEDURE [dbo].[app_Event_GetUpcomingDisplay] @startDate DATETIME = NULL, @endDate DATETIME = NULL, @systemID INT = 0, @branchID INT = 0, @searchText NVARCHAR(255) = NULL, @TenID INT = NULL AS SELECT e.*, c.[Code] AS [Branch],...
ALTER TABLE groups ADD CONSTRAINT check_name_length CHECK (length(name) >= 3 and length(name) <= 64);
SELECT AVG(salary) AS min_average_salary FROM `employees` GROUP BY department_id ORDER BY salary ASC LIMIT 1;
<filename>sql/customers.sql INSERT INTO early_ships (`customer_id`) VALUES ('Hoffman', '<EMAIL>'), ('Hoffman1', '<EMAIL>'), ('Hoffman2', '<EMAIL>'), ('Hoffman3', '<EMAIL>'), ('Hoffman4', '<EMAIL>'), ('Hoffman5', '<EMAIL>'), ('Hoffman6', '<EMAIL>'), ('Hoffman7', '<EMAIL>'), ('Hoffman8', '<EMAIL>'), ('Hoffman9', '<EMAIL...
/** * This is the database schema for testing MySQL support of Rock DAO and Active Record. * The database setup in config.php is required to perform then relevant tests: */ DROP TABLE IF EXISTS `access_assignments` CASCADE; DROP TABLE IF EXISTS `access_roles_items` CASCADE; DROP TABLE IF EXISTS `access_items` CASCA...
<reponame>meowpunch/bobsim-research INSERT INTO user (gender) VALUES (1),(2),(1),(2),(3),(1),(2),(1),(2), (1),(2),(1),(2),(1),(2),(1),(2),(1),(2),(4),(1),(2),(1),(2),(5),(3), (1),(2),(1),(2),(4),(3),(1),(2),(1),(2),(6),(1),(2),(1),(2),(4),(1),(2),(3),(1),(2),(1),(2),(5), (1),(2),(1),(2),(1),(2),(1),(2),(1),(2),(7),(3),...
<filename>src/main/resources/migrations/00040_create_table_payouts.sql --liquibase formatted sql --changeset uk.gov.pay:create_table_payouts CREATE TABLE payouts ( id BIGSERIAL PRIMARY KEY, gateway_payout_id VARCHAR(26), amount BIGINT NOT NULL, created_date TIMESTAMP WITH TIME ZONE DEFAULT (now() AT TI...
USE [ANTERO] GO DROP PROCEDURE IF EXISTS [dw].[p_lataa_d_ytj_yritystiedot] GO /****** Object: StoredProcedure [dw].[p_lataa_d_ytj_yritystiedot] Script Date: 14.12.2020 17:09:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dw].[p_lataa_d_ytj_yritystiedot] AS TRUNCATE TABLE ANTER...
<gh_stars>1-10 DO $$ BEGIN CREATE ROLE amigo WITH NOLOGIN; EXCEPTION WHEN DUPLICATE_OBJECT THEN RAISE NOTICE 'not creating role amigo -- it already exists'; END $$; create schema if not exists public; GRANT ALL ON SCHEMA public to amigo; CREATE TABLE IF NOT EXISTS account ( ...
<filename>db/db_mysql/migrations/20180830215624_add_categories_for_landing_templates_columns.sql -- +goose Up -- SQL in this section is executed when the migration is applied. ALTER TABLE `templates` ADD `tag` INT(11) NOT NULL AFTER `rating`; ALTER TABLE `pages` ADD `tag` INT(11) NOT NULL AFTER `public`; -- +goose Do...
<reponame>vincentmorneau/insum-insider-demo<filename>apex/page/10011/region/Top Users Chart/jet_chart/jet_chart_series/Top Users/Top Users[sourceSqlQuery].sql<gh_stars>1-10 select lower(userid) as userid, count(*) as page_views from apex_activity_log where flow_id = :app_id and time_stamp >= sysdate - ( 1/24/60...
DECLARE temp NUMBER; BEGIN SELECT COUNT(*) INTO temp FROM user_tables WHERE table_name = 'COI_COMMITTEE_ROLE_TYPE'; IF temp > 0 THEN EXECUTE IMMEDIATE 'DROP TABLE COI_COMMITTEE_ROLE_TYPE CASCADE CONSTRAINTS PURGE'; END IF; END; / CREATE TABLE COI_COMMITTEE_ROLE_TYPE ( COI_COMMITTEE_ROLE_TYPE_CODE VARCHAR2(3), DESC...
<gh_stars>0 CREATE DATABASE <DB_NAME>; CREATE USER <DB_USER> WITH PASSWORD '<<PASSWORD>>';
-- -- Copyright 2015-2018 Micro Focus or one of its affiliates. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required...
<gh_stars>1000+ -- Installs the pg_trgm extension for trigram indexing CREATE EXTENSION IF NOT EXISTS pg_trgm; -- Build a partial index for each entity-attribute CREATE OR REPLACE FUNCTION build_attribute_index(subgraph_id Text,index_name Text,index_type Text,index_operator Text, jsonb_index Boolean, attribute...
<reponame>KK578/Mandarin -- BASHI-101: Migrate from Entity Framework to Dapper -- -- This script is the initial setup for the tables at the time of moving from EntityFramework to Dapper. CREATE SCHEMA IF NOT EXISTS inventory; CREATE SCHEMA IF NOT EXISTS billing; CREATE TABLE IF NOT EXISTS billing.commission_rate_grou...
-- @testpoint:opengauss关键字snapshot(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists snapshot; CREATE TABLESPACE snapshot RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; drop tablespace snapshot; --关键字带双引号,创建成功 drop tablespace if exists "snapshot"; CREATE TABLESPACE "snapshot" RELATIVE LOCATION 'hdfs_tab...
<gh_stars>0 SELECT DISTINCT ON(role, display_order, fixtures.id, players.id) list_positions.id::TEXT, fpl_team_lists.id AS fpl_team_list_id, JSONB_BUILD_OBJECT( 'id', players.id::TEXT, 'first_name', first_name, 'last_name', last_name, 'total_points', players.total_points, 'status', players.status, 'news', n...
<filename>src/main/resources/db/migration/V15__Rename_follow_request.source_type_to_action_type.sql alter table action_log rename column source_type to action_type;
<filename>db/knowledge.sql -- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 29, 2021 at 11:39 AM -- Server version: 10.4.18-MariaDB -- PHP Version: 7.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
<gh_stars>0 USE DBADemoDB GO --Used to drop a specific column ALTER TABLE Products DROP COLUMN Price; GO --Basic drop table command DROP TABLE Employees; DROP TABLE Products; DROP TABLE SaleOrder;
-- TTV Tenant ------------------------------------------------------------------- USE TTV; INSERT INTO `ACT_ID_USER` VALUES ('adminTTV',1,'','','','{SHA-512}ZYCbsz2wse7eC1OcxLwiU4ajNxxFmzehHlJJ1m/kNtheFNmE1nJAkA0QbI5D+V02C3g/CBVSfD3qqmrE1TJ3iA==','mPXU7f5tLyzVH9vLvdPIrg==',NULL); INSERT INTO `ACT_ID_GROUP` VALUES ('ca...
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 26 Mei 2019 pada 06.05 -- Versi Server: 10.1.25-MariaDB -- PHP Version: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 ...
-- Migration: project-description -- Created at: 2020-03-22 18:45:10 -- ==== UP ==== BEGIN; ALTER TABLE `projects` ADD COLUMN `description` TEXT NOT NULL AFTER `name`; COMMIT; -- ==== DOWN ==== BEGIN; ALTER TABLE `projects` DROP COLUMN `description`; COMMIT;
<reponame>praveenjee/learnlaravel<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 09, 2018 at 12:15 PM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.1.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSAC...
-- https://www.hackerrank.com/challenges/binary-search-tree-1/problem -- Binary Tree Nodes select n, case when p is null then 'Root' when refrence = 0 then 'Leaf' else 'Inner' end from ( select *, (select count(*) from BST as innertbl where innertbl.p = BST.n) as refrence fr...
<reponame>MrMarble/steamdb-telegram-bot CREATE TABLE IF NOT EXISTS `cache` ( `id` TEXT NOT NULL UNIQUE, `data` BLOB, `date` FLOAT, PRIMARY KEY(`id`) ); CREATE TABLE IF NOT EXISTS `log` ( `user_id` NUMERIC NOT NULL, `username` TEXT, `first_name` TEXT, `last_name` TEXT, `language_code` TEXT, `text` TEXT, `chat_id` NUMERI...
-- -- ■ USERS -- BEGIN; -- ⋯ Table prerequisites DROP TYPE IF EXISTS USER_REGISTRATION_STATUS; CREATE TYPE USER_REGISTRATION_STATUS AS ENUM ('unconfirmed', 'confirmed'); -- ✨ Table definition CREATE TABLE IF NOT EXISTS swag.users ( id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, email CITEXT UNI...
<filename>DB/MsSQL_PerfmonE/DeploymentScripts/02_RolesAndSchemas.sql print '--- Registering roles and schemas ---' GO USE [master] GO CREATE LOGIN [perfmon] WITH PASSWORD=N'<PASSWORD>', DEFAULT_DATABASE=[PerfmonE], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF GO USE [PerfmonE] GO CREATE USER [perfmon] FOR LOGIN [perfmon] W...
<filename>Samples/MySQL/Image/Image.sql USE images; DROP TABLE IF EXISTS Images; CREATE TABLE Images ( Id INTEGER NOT NULL, Language VARCHAR(10) NOT NULL, Name VARCHAR(100) NOT NULL, Data BLOB NOT NULL, PRIMARY KEY(Id, Language) ); INSERT INTO Images VALUES(0, 'en', 'Flag', LOAD_FILE('D:/NT/Deploy/Samples/...
select concat_ws(e'\n' ,'BEGIN;' ,'' ,'-- select and execute following line to drop trigger' ,'DROP TRIGGER ' || quote_ident(tgname) || ' ON ' || tgrelid::regclass || ';' ,'' ,pg_get_triggerdef(oid) || ';' ,'' ,'ROLLBACK;' ,'' ) as def from pg_trigger where oid = $1
-- Link to schema: https://app.quickdatabasediagrams.com/#/d/G0m7jP -- Drop tables DROP TABLE IF EXISTS Departments; DROP TABLE IF EXISTS Dept_Employee; DROP TABLE IF EXISTS Employee; DROP TABLE IF EXISTS Dept_Manager; DROP TABLE IF EXISTS Salaries; DROP TABLE IF EXISTS Titles; -- Create Tables CREATE TABLE Titles (...
<gh_stars>100-1000 UPDATE [Categories] SET [CategoryName] = @CategoryName, [Description] = @Description, [BrochurePath] = @BrochurePath , [Picture] = @Picture WHERE (([CategoryID] = @Original_CategoryID))
<gh_stars>1-10 INSERT INTO [Lookup].[ImportNotificationStatus] ( [Id], [Description] ) VALUES (7, 'Ready to acknowledge'), (8, 'Decision required by'); GO ALTER TABLE [ImportNotification].[NotificationDates] ADD [NotificationCompletedDate] DATETIMEOFFSET NULL; GO ALTER TABLE [ImportNotification].[Notification...
<filename>src/main/resources/deb/opt/havis-apps/conf/havis/custom/harting/processviewer/history.sql CREATE TABLE IF NOT EXISTS history ( id IDENTITY NOT NULL, timestamp TIMESTAMP NOT NULL, epc TEXT NOT NULL, readpoint TEXT NOT NULL, format TEXT NOT NULL, fields TEXT NOT NULL, PRIMARY KEY(id) );
<filename>src/main/resources/templates/db_scripts/update_file_extensions.sql -- default_file_extensions: -- change values: from MARC to MARC_BIB, add MARC_AUTHORITY and MARC_HOLDING UPDATE ${myuniversity}_${mymodule}.default_file_extensions SET jsonb = regexp_replace(jsonb::text, '\"MARC\"', '"MARC_BIB","MARC_AUTHORITY...
<filename>config/tbl_post.sql -- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1 -- Время создания: Апр 15 2019 г., 14:50 -- Версия сервера: 5.6.17 -- Версия PHP: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
drop table bdot_buildings_old;
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 19 Apr 2019 pada 13.22 -- Versi server: 10.1.37-MariaDB -- Versi PHP: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
<reponame>cmancone/credential-less-3-database<filename>sql/categories.sql CREATE TABLE `categories` ( `id` CHAR(36) NOT NULL DEFAULT '', `parent_id` CHAR(36) DEFAULT NULL, `name` VARCHAR(255) NOT NULL DEFAULT '', `description` TEXT, `created_at` DATETIME NOT NULL, `updated_at` DATETIME NOT NULL, PRIMARY K...
<filename>slqbaza.sql -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 08, 2017 at 03:36 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.5.35 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLI...
USE employee_trackerDB; INSERT INTO department (name) VALUES ("Web Development"), ("Sales"), ("Legal"), ("Human Resources"), ("Management"), ("Accounting"); INSERT INTO role (title, salary, department_id) VALUES ("Senior", 200000, 1),("Junior", 60000, 1),("Lawyer", 150000, 3),("Graphic Design", 100000, 1),("Accountan...
<filename>SqlScripts/createview_physical.sql select num,time,powersum,power1,power2,ratio,phywarn from phydect_table
UPDATE `settings` SET `value` = '3.5' WHERE `settings`.`type` = 'current_version'; INSERT INTO `settings` (`id`, `type`, `value`, `created_at`, `updated_at`, `deleted_at`) VALUES (NULL, 'profile_picture_approval_by_admin', NULL, current_timestamp(), current_timestamp(), NULL), (NULL, 'profile_picture_privacy', 'all',...
DROP VIEW IF EXISTS View_LectureSchedule; GO CREATE VIEW View_LectureSchedule AS SELECT [event].eventid AS EventId, [event].start AS Start, [event].[end] AS [End], [event].presenter AS Presenter, [event].[description] AS [Description], [event].location AS Location, [event].[status] AS StatusId, transStatus....
# ************************************************************ # Sequel Pro SQL dump # Versión 4096 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: 127.0.0.1 (MySQL 5.5.27) # Base de datos: symfony # Tiempo de Generación: 2014-09-03 15:32:39 +0000 # ***************************************...
<filename>Portal/WebSystem/WCMS.Framework.SqlDabase/dbo/Stored Procedures/DownloadProperty_Get.sql CREATE PROCEDURE [DownloadProperty_Get] ( @SitePageItemID int, @PageType int ) AS SET NOCOUNT ON SELECT TOP (1) DownloadPropertyID, InitialControl, Columns, Rows, MaxRecords, ForceDownload FROM Dow...
/* INSERT INTO [dbo].[Person] ([Title] ,[FirstName] ,[Surname] ,[PersonTypeId] ) VALUES (1, 'John', 'Smith', 1) */
<gh_stars>1-10 -- For each account, determine the average amount of each type of paper they purchased across their orders. Your result should have four columns - one for the account name and one for the average quantity purchased for each of the paper types for each account. SELECT a.name, AVG(o.standard_qty) avg_stand...
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [AbpUserTokens]( [Id] [bigint] IDENTITY(1,1) NOT NULL, [TenantId] [int] NULL, [UserId] [bigint] NOT NULL, [Name] [nvarchar](128) NULL, [Value] [nvarchar](512) NULL, [LoginProvider] [nvarchar](128) NULL, [ExpireDate] [datetime2](7)...
<filename>backend/de.metas.contracts/src/main/sql/postgresql/system/50-de.metas.contracts/5600350_sys_gh11488_Cleanup_duplicate_zero_commission_contracts.sql<gh_stars>1000+ -- 1. update all c_commission_share to use the first created 0% commission contract UPDATE c_commission_share SET c_flatrate_term_id = subquery.c_...
<gh_stars>0 -- create new tables / functions / triggers -- \i init/updates/NET-169-solarflux.sql -- apply production permissions -- -- NOTE: must be run as superuser for CREATE USER ALTER TABLE solaruser.user_auth_token_node_ids OWNER TO solarnet; GRANT SELECT ON TABLE solaruser.user_auth_token_node_ids TO solar; GR...
INSERT INTO vehiculo (placa, marca, referencia, estado, precioDia, fecha_creacion) VALUES(:placa, :marca, :referencia, :estado, :precioDia, :fechaCreacion);
<filename>src/main/resources/liquibase/harness/change/expectedSql/postgresql/10/createProcedure.sql INVALID TEST Postgres10 doesn't support stored procedures processing
<reponame>schottj/yukon {{ config(schema='environment') }} with items as ( select * from {{ref('stg_items')}} limit 1 ) select '{{env_var("DBT_ENVIRONMENT","default")}}' as environment, '{{env_var("DBT_CLOUD_RUN_ID","default")}}' as run_id from items
select tweet_id, any_value(text_tokens) as text_tokens from ( select tweet_id, any_value(text_tokens) as text_tokens from `recsys2020.training` group by tweet_id union all select tweet_id, any_value(text_tokens) as text_tokens from `recsys2020.test` group by tweet_id ) group by tweet_id
<reponame>1544712020/user-info-manage<filename>shixun.sql -- -------------------------------------------------------- -- 主机: 127.0.0.1 -- 服务器版本: 5.7.32 - MySQL Community Server (GPL) -- 服务器操作系统: Win64 -- HeidiSQL 版本: 10.2.0.5704 -- -...
<filename>components/automate-workflow-server/schema/revert/changes_for_changeset_ids@0.1.16.sql -- Revert delivery:changes_for_changeset_ids from pg BEGIN; DROP FUNCTION IF EXISTS changes_for_changeset_ids(UUID[]); COMMIT;
<gh_stars>1000+ CREATE TABLE "identity_credential_types" ( "id" TEXT PRIMARY KEY, "name" TEXT NOT NULL );