sql
stringlengths
6
1.05M
/****************************************************************************** * * OMOP - Cloud Research Lab * * Observational Medical Outcomes Partnership * (c) Foundation for the National Institutes of Health (FNIH) * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use th...
USE ota; DROP PROCEDURE IF EXISTS get_integer_property; DELIMITER // CREATE PROCEDURE get_integer_property ( IN property_name varchar(50), IN primary_key varchar(50), IN secondary_key varchar(50), OUT return_value int ) BEGIN SELECT int_value INTO return_value FROM property p WHERE p.property_...
<reponame>zhuoyu0527/andrei<filename>andrei-service/src/test/resources/sql/andrei.sql /* Navicat MySQL Data Transfer Source Server : 本地 Source Server Version : 80011 Source Host : localhost:3306 Source Database : andrei Target Server Type : MYSQL Target Server Version : 80011 File Encoding ...
<reponame>VladimirZhdanov/job4j --product(id, name, type_id, expired_date, price) --type(id, name) CREATE TABLE type ( ID serial primary key, name varchar (50) ); INSERT INTO type(name) values('СЫР'), ('МОЛОКО'), ('мороженное'); CREATE TABLE product ( ID serial primary key, name varchar (50), expired_date ...
<gh_stars>1000+ DROP TEMPORARY TABLE IF EXISTS temp_tab; CREATE TEMPORARY TABLE temp_tab (number UInt64); INSERT INTO temp_tab SELECT number FROM system.numbers LIMIT 1; SELECT number FROM temp_tab; SET send_logs_level = 'fatal'; EXISTS TEMPORARY TABLE temp_tab; DROP TABLE temp_tab; EXISTS TEMPORARY TABLE temp_tab; SET...
<gh_stars>1-10 /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50553 Source Host : localhost:3306 Source Database : xywy Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2018-11-23 17:48:13 */ SET FOREIGN_KEY_CHE...
<gh_stars>10-100 SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE FUNCTION [RDF.].[fnURI2NodeID] ( @URI nvarchar(4000) ) RETURNS bigint AS BEGIN DECLARE @result bigint IF @URI IS NULL SELECT @result = NULL ELSE SELECT @result = NodeID FROM [RDF.].Node WHERE ValueHash = [RDF.].fnValueHash(null,null...
CREATE DATABASE [Curso] GO USE master GO DROP DATABASE [Curso] GO
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 26, 2018 at 04:45 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.5.37 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
/* SQLyog Ultimate v11.11 (32 bit) MySQL - 5.5.49 : Database - uab_eventos ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CH...
DELETE FROM ORDERS WHERE ReturnDate IS NULL
CREATE TABLE NARMESTE_LEDER_RELASJON ( id SERIAL PRIMARY KEY, uuid VARCHAR(50) NOT NULL UNIQUE, created_at timestamptz NOT NULL, updated_at timestamptz NOT NULL, referanse_u...
<reponame>kotigor/dev.bx<gh_stars>0 CREATE TABLE IF NOT EXISTS director ( ID int not null auto_increment, NAME varchar(500) not null, PRIMARY KEY (ID) ); CREATE TABLE movie ( ID int not null auto_increment, TITLE varchar(500) not null, ORIGINAL_TITLE varchar(500) not null, DESCRIPTION text ...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.17.32 -- Generation Time: May 08, 2021 at 04:54 PM -- Server version: 10.4.18-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_...
CREATE TABLE public.see_clientassetmaster ( id numeric(10) NOT NULL DEFAULT nextval('see_clientassetmaster_seq'::regclass), clientid numeric(10) NOT NULL, asset_id varchar(100) NOT NULL, lineid varchar(100) NOT NULL, linename varchar(100) NOT NULL, clientunits varchar(20) NULL, machinetype varchar(50) NULL, tim...
-- MySQL dump 10.13 Distrib 5.7.11, for Win64 (x86_64) -- -- Host: localhost Database: crep -- ------------------------------------------------------ -- Server version 5.7.11-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*...
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!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 utf8 */; -- -- Database: `vacode` -- -- --------------------...
/* This generates random data for testing and demo'ing. Run setup.sql first Then run this When you are done playing and want the real thing, run setup.sql again */ /* create issues */ DO $$ DECLARE my_counter int := 0; my_s text; number_of_issues int := 4000; /* how many issues to generate */ my_array te...
SET FOREIGN_KEY_CHECKS=0; drop table if exists `CONFIG`; create table `CONFIG` ( name varchar(255) primary key, value text ) engine = innodb default charset=utf8 /*! collate utf8_bin */; drop table if exists `USER`; create table `USER` ( id int primary key auto_increment, tenant text, name varchar(...
<gh_stars>0 WITH init_data AS ( SELECT cohort_definition_id, subject_id AS person_id, cohort_start_date, SUM(weight) AS value FROM @cohortDatabaseSchema.charlson_map ...
-- @testpoint: opengauss关键字message_length(非保留),作为存储过程名,部分测试点合理报错 --关键字不带引号-成功 drop procedure if exists message_length; create procedure message_length(section number(6),salary_sum out number(8,2),staffs_count out integer) is begin select sum(salary), count(*) into salary_sum, staffs_count from staffs where section...
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 13 Feb 2021 pada 14.11 -- Versi Server: 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 */; /*!4...
DROP DATABASE IF EXISTS ultimatemovie_db; CREATE DATABASE ultimatemovie_db;
-- AlterTable ALTER TABLE "Post" ALTER COLUMN "c" SET DEFAULT CURRENT_TIMESTAMP;
CREATE OR REPLACE VIEW processes.all_processes WITH (security_barrier) AS SELECT Process.process_id, Process.name AS process_name, Process.description ...
<reponame>xander69/Practice-SpringBoot delete from scenario; insert into scenario (id, name, descr, user_id) values (1, 'Scenario 1', 'Description of scenario 1', 1), (2, 'Scenario 2', 'Description of scenario 2', 1), (3, 'Scenario 3', 'Description of scenario 3', 1), (4, 'Scenario 4', 'Descriptio...
ALTER TABLE `user` ADD `password_reset_token` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NULL DEFAULT NULL ; ALTER TABLE `user` ADD `password_reset_timeout` DATETIME NULL DEFAULT NULL ;
-- department_id -- department_name -- over_head_costs (A dummy number you set for each department)
CREATE OR REPLACE FUNCTION resident_registration_check( ) RETURNS trigger AS $resident_registration_check$ DECLARE resident_id integer := NEW.fk_resident_id; resident_registration registrations; BEGIN SELECT * FROM registrations WHERE id = NEW.fk_registration_id INTO resident_regi...
/*Create inline table valued function dbo.fn_EmployeeDetails_InlineDate that for specific Date will return list of all Employee FirstName,lastName, DateOfBirth which were hired in that Date Modify dbo.fn_EmployeeDetails_InlineDate to accept 2 date parameters and will return all employee that were hired between those...
-- file:rules.sql ln:287 expect:true insert into rtest_emp select * from rtest_empmass
<filename>src/test/resources/sql/create_view/67c4729d.sql -- file:updatable_views.sql ln:31 expect:true CREATE VIEW ro_view20 AS SELECT a, b, generate_series(1, a) g FROM base_tbl
INSERT INTO local_conditions SELECT time, 'US', (random()*30)::int, random()*80 FROM generate_series( '2020-01-01 00:00:00'::timestamptz, '2020-01-01 00:00:00'::timestamptz + INTERVAL '999999 seconds', '1 second' ) AS time;
<filename>backend/de.metas.fresh/de.metas.fresh.base/src/main/sql/postgresql/system/70-de.metas.fresh/5535080_sys_gh5704_AddColumnIsCampaignPriceInC_OrderLine.sql -- 2019-10-23T13:59:30.213Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,...
-- Drops the programming_db if it already exists DROP DATABASE IF EXISTS employee_db; -- Created the BD "employee_db" CREATE DATABASE employee_db; -- Use the DB "employee_db" for all the rest of the script USE employee_db; -- Created the table "employee" CREATE TABLE employees ( id INT NOT NULL AUTO_INCREMENT, ...
INSERT INTO USER (ID, NAME, EMAIL, ROLE) VALUES (1, 'Samuel', '<EMAIL>', 'user,network'); INSERT INTO USER (ID, NAME, EMAIL, ROLE) VALUES (2, 'Roger', '<EMAIL>', 'user'); INSERT INTO USER (ID, NAME, EMAIL, ROLE) VALUES (3, 'Sid', '<EMAIL>', 'user');
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++ --START : PLEASE DO NOT MAKE ANY CHANGES TO THIS SECTION. --+++++++++++++++++++++++++++++++++++++++++++++++++++++++ SET define on SET echo on SET linesize 2048 SET escape off SET timing on SET trimspool on SET serveroutput on --++++++++++++++++++++++++++++++++++...
GO CREATE TABLE [dbo].[Type]( [TypeId] [varchar](255) NOT NULL, [Name] [varchar](255) NOT NULL, CONSTRAINT [PK_EntityId] PRIMARY KEY CLUSTERED ( [TypeId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO
/* Navicat MySQL Data Transfer Source Server : 127.0.0.1-lql Source Server Version : 50718 Source Host : localhost:3306 Source Database : bill Target Server Type : MYSQL Target Server Version : 50718 File Encoding : 65001 Date: 2021-09-04 21:53:39 */ SET FOREIGN_KEY_CHECKS=0; -- ...
use mysql; -- db 생성 CREATE DATABASE test DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; -- 유저 생성 CREATE USER 'test'@'localhost' IDENTIFIED BY 'test'; -- DB 별 권한 부여 INSERT INTO db (HOST,Db,USER,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Index_priv, Alter_priv) VALUES('localhost','test','test',...
<gh_stars>0 CREATE TABLE IF NOT EXISTS GRADE ( GRADE_CODE INTEGER NOT NULL, BONUS_MAGNIFICATION INTEGER, FIXED_BONUS INTEGER, PRIMARY KEY (GRADE_CODE) ); CREATE TABLE IF NOT EXISTS EMP ( EMP_ID INTEGER NOT NULL, EMP_NAME VARCHAR(50), BASIC_SALARY INTEGER, GRADE_CODE INTEGER NOT NULL, PRIMARY KEY (EMP...
{% macro get_external_build_plan(source_node) %} {{ return(adapter.dispatch('get_external_build_plan', 'dbt_external_tables')(source_node)) }} {% endmacro %} {% macro default__get_external_build_plan(source_node) %} {{ exceptions.raise_compiler_error("Staging external sources is not implemented for the default...
<reponame>christopappas/gocd-analytics-plugin<gh_stars>1-10 ALTER TABLE pipelines RENAME COLUMN total_time TO total_time_secs; ALTER TABLE pipelines ALTER COLUMN total_time_secs TYPE INTEGER; ALTER TABLE pipelines RENAME COLUMN time_waiting TO time_waiting_secs; ALTER TABLE pipelines ALTER COLUMN time_waiting_secs TYPE...
DROP TABLE IF EXISTS groupchanels;
SELECT * FROM dml_trigger_table_1 order by 2; --start_ignore SET client_min_messages='log'; DELETE FROM dml_trigger_table_1 where age=10; SET client_min_messages='notice'; --end_ignore SELECT * FROM dml_trigger_table_1 order by 2; \!grep Planner %MYD%/output/delete_fallback_orca.out
<filename>crm-master_back/migrations/_contact_source.sql INSERT INTO `contact_source` (`source`) VALUES ( '7 days'), ( '<NAME>'), ( 'abudhabi.classonet.com'), ( 'Agent'), ( 'Agent External'), ( 'Agent Internal'), ( '<NAME>'), ( '<NAME>'), ( '<NAME>'), ( 'Al Ittihad News paper'), ( '<NAME>'), ( '<NAME>'), ( '<NAME>'), (...
<reponame>osu-cass/dotnet-core-microservices-example<gh_stars>0 CREATE TABLE [dbo].[department] ( [Id] INT NOT NULL PRIMARY KEY, [Name] VARCHAR(MAX) NOT NULL, [ContactNumber] VARCHAR(MAX) NOT NULL, [LastUpdated] DATETIME2 NOT NULL )
-- Table for keeping track of releases CREATE TABLE IF NOT EXISTS schema_version ( id INTEGER PRIMARY KEY AUTOINCREMENT, version INTEGER, date TIMESTAMP ); -- Initialize with version 0, if table is empty INSERT INTO schema_version (version, date) SELECT 0, datetime('now','localtime') WHERE NOT EXISTS ( S...
<gh_stars>0 use jdbcdemo; -- Currency Table insert into undamped_coin (wallet_address) values (1); insert into undamped_coin (wallet_address) values (2); insert into undamped_coin (wallet_address) values (3); insert into undamped_coin (wallet_address) values (4); insert into undamped_coin (wallet_address) values (5); ...
CREATE TABLE IF NOT EXISTS order_detail ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, order_number VARCHAR(12) NOT NULL, email VARCHAR(250) NOT NULL, promo_code VARCHAR(8), quantity INT(4) NOT NULL )
-- phpMyAdmin SQL Dump -- version 4.4.4 -- http://www.phpmyadmin.net -- -- Vært: localhost -- Genereringstid: 28. 05 2015 kl. 14:40:31 -- Serverversion: 5.5.43 -- PHP-version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
-- phpMyAdmin SQL Dump -- version 4.9.5deb2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jul 10, 2020 at 10:49 AM -- Server version: 8.0.20-0ubuntu0.20.04.1 -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
<reponame>tushartushar/dbSmellsData CREATE TABLE `City` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` char(35) NOT NULL DEFAULT '', `CountryCode` char(3) NOT NULL DEFAULT '', `District` char(20) NOT NULL DEFAULT '', `Population` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`ID`))
<reponame>fbb-oc/sqlfluff<filename>test/fixtures/dialects/tsql/insert_with_identity_insert.sql SET IDENTITY_INSERT someTable ON; INSERT INTO someTable (ID, Value) VALUES (1, 2); SET IDENTITY_INSERT someTable OFF;
<filename>docker/sample/start/database/database_pgsql.sql -- -- PostgreSQL database dump -- -- Dumped from database version 9.5.24 -- Dumped by pg_dump version 13.1 (Ubuntu 13.1-1.pgdg18.04+1) -- Started on 2021-01-13 18:42:39 CET SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET sta...
<reponame>Zyres/AE_OneDB /* SQLyog Professional v13.1.7 (64 bit) MySQL - 8.0.21 : Database - asc_world_new ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /...
<filename>app/admin/main/up/model/signmodel/sign_up_db.sql # (fat 1, uat 1, prod 0) CREATE TABLE `sign_up` ( id int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '签约ID', sex tinyint(4) NOT NULL DEFAULT '0' COMMENT '性别,性别 0:保密 1:男 2:女', mid int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'up主id', begin_date date NO...
<reponame>NewFlight-co/createvid<filename>packages/server/migrations/sqls/20190722204933-TaskConfigProperty-down.sql /* Replace with your SQL commands */ alter table tasks drop config;
<gh_stars>0 Create database Puerto; Use Puerto; create table Muelle ( id_muelle int(9) primary key not null auto_increment, size varchar(25) not null, ocupado tinyint(1) ) engine=InnoDB; create table Barco ( id_barco int(9) primary key not null auto_increment, nombre varchar(25) not null, size varchar(25) not null, ...
<reponame>rvijay17/snapshot-experiment {% snapshot source_cc_transaction_line %} {{ config( tags=["source"], unique_key='id', pre_hook=before_begin("{{ mu_delta_load_job_control_start('" ~ this.identifier ~ "') }}"),       post_hook="ANALYZE {{ this }}", target_schema='dev_evan', stra...
<gh_stars>0 -- PARALLEL_START; SET @CInactivationRefSet = '900000000000489007'; SET @DInactivationRefSet = '900000000000490003'; INSERT INTO rf2_concept SELECT * FROM rf2_concept_sv s WHERE s.effectiveTime = (SELECT MAX(sv.effectiveTime) AS LatestDate FROM rf2_concept_sv AS sv WHERE sv.id=s.id AND sv.effectiveTi...
insert into public.history( title, address, municipality, postal, tel1, tel2, fax, email, site, facebook, twitter, category, description, static_or_dynamic, comments, the_geom, verification_status, input_date, valid_until, valid_from, inserter, cocoon_like, cocoon_dislike, ...
<filename>database/TransAction.SQL/dbo/Views/TRA_TEAM_VW.sql CREATE VIEW [dbo].[TRA_TEAM_VW] AS SELECT *, NumMembers = (SELECT COUNT(USER_ID) FROM TRA_USER WHERE TRA_USER.TEAM_ID = TRA_TEAM.TEAM_ID) FROM TRA_TEAM
<gh_stars>0 -- Drop restriction_note_id ALTER TABLE sims.student_restrictions DROP COLUMN IF EXISTS restriction_note_id; -- Drop resolution_note_id ALTER TABLE sims.student_restrictions DROP COLUMN IF EXISTS resolution_note_id;
<reponame>liuyubin888/fangchan<filename>yuefanghui.sql<gh_stars>0 /* Navicat MySQL Data Transfer Source Server : this Source Server Version : 50540 Source Host : localhost:3306 Source Database : yuefanghui Target Server Type : MYSQL Target Server Version : 50540 File Encoding ...
ALTER TABLE users ALTER COLUMN role DROP NOT NULL, ALTER COLUMN is_active DROP NOT NULL, ALTER COLUMN is_deleted DROP NOT NULL, ALTER COLUMN is_in_blacklist DROP NOT NULL;
ALTER TABLE vizier_cluster_info ADD COLUMN control_plane_pod_statuses json NOT NULL DEFAULT '{}';
/* Warnings: - You are about to drop the column `href` on the `Job` table. All the data in the column will be lost. - A unique constraint covering the columns `[companyName,slug]` on the table `Job` will be added. If there are existing duplicate values, this will fail. - Added the required column `slug` to the...
<filename>tests/queries/0_stateless/00464_sort_all_constant_columns.sql SELECT * FROM (SELECT 1 AS x, 2 AS y) ORDER BY x; SELECT * FROM (SELECT x FROM (SELECT 2 AS x, arrayJoin([1,2,3]))) ORDER BY x;
<reponame>mtaghiza/tinyos-main-1 .mode csv SELECT rx_adj.node as node, round(avgDepth) as depth, startGap - testStart.ts as ts, round(gapLen/20.8) as mc FROM rx_adj JOIN (select min(startGap) as ts from rx_adj) testStart JOIN agg_depth ON agg_depth.node == rx_adj.node order by startGap;
<gh_stars>0 Delete from `arm_members` where `MemberId`>'179';
<gh_stars>0 begin transaction; create table punti( x integer, y integer, id serial primary key ); create table misurazioni( id serial primary key, temperature real , humidity real , light real , pressure real , noise real , etvoc real , eco2 real , data_misurazione date , orario_misurazione time , posi...
CREATE OR REPLACE VIEW student_current_cycle AS SELECT student.id as student_id, estimate_cycle(current_date, student.birthdate) as current_cycle FROM student;
CREATE TABLE IF NOT EXISTS `mqtt_users` ( `Id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `Username` varchar(128) NOT NULL, `Password` varchar(512) NOT NULL, PRIMARY KEY (`Id`), UNIQUE KEY `Username` (`Username`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `mqtt_use...
<filename>05-Stored Procedures/EncryptDatabase.sql USE DBA_Util GO IF EXISTS (SELECT 1 FROM sys.procedures WHERE name = 'EncryptDatabase') DROP PROCEDURE EncryptDatabase GO CREATE PROCEDURE EncryptDatabase (@db_name SYSNAME ,@cert_name SYSNAME = 'PWC_tdeCert') WITH ENC...
insert into city values (2923543,"Furth","DE",8.78472,49.650829), (6556505,"Furth","DE",12.0333,48.599998), (2923549,"Furth","DE",12.03333,48.599998), (2923553,"Furth","DE",12.38333,48.400002), (2923584,"Furstenzell","DE",13.31667,48.533329), (6556526,"Fürstenstein","DE",13.3333,48.716702), (2923595,"Furstenstein","DE"...
<reponame>NathanKe/robobase<gh_stars>0 -- User Table -- -- nathan - admin set @salt = (select md5(rand())); insert into users values (0,'nathan','1111111',@salt,SHA2(CONCAT(@salt,'password'),512)); -- kristen & frank - coaches set @salt = (select md5(rand())); insert into users values (0,'kristen','2222222',@salt,SHA2(...
CREATE DATABASE burgers_db; USE burgers_db; CREATE TABLE burgers ( id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, burger_name VARCHAR(30) NOT NULL, devoured BOOLEAN DEFAULT FALSE NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP );
SELECT j.job_title, ROUND(SUM(j.salary)/COUNT(p),2)::float AS average_salary, COUNT(p.id) AS total_people, ROUND(SUM(j.salary),2)::float AS total_salary FROM people p JOIN job j ON j.people_id = p.id GROUP BY j.job_title ORDER BY average_salary DESC;
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Apr 10, 2019 at 07:41 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.2.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
<reponame>scrollytelling/app<filename>.cloud66/backup_verifier_mysql.sql select count(*)<>0 as result from pageflow_entries;
create table admins (admin_id SERIAL, email varchar(50) UNIQUE, name varchar(50) NOT NULL, password varchar(20) NOT NULL, primary key (admin_id) ); create table posts ( post_id SERIAL, created_timestamp timestamp NOT NULL, image bytea, ima...
begin; select year, team_name, division_id, count(*) from (select distinct ts.year,p.team_name,t.division_id,p.game_id from ncaa_pbp.box_scores_pitching bs join ncaa_pbp.periods p on (p.game_id,p.section_id)=(bs.game_id,bs.section_id) join ncaa_pbp.team_schedules ts on (ts.team_id,ts.game_id)=(p.team_id,p.game_id) joi...
 CREATE PROCEDURE dbo.spTeam_GetAll AS BEGIN SET NOCOUNT ON; SELECT * FROM dbo.Teams; END
<filename>src/test/resources/crash4.test_1.sql -- crash4.test -- -- db eval {CREATE TABLE a(id INTEGER, name CHAR(50))} CREATE TABLE a(id INTEGER, name CHAR(50))
-- file:plpgsql.sql ln:3997 expect:true $outer$
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50547 Source Host : localhost:3306 Source Database : wanxie Target Server Type : MYSQL Target Server Version : 50547 File Encoding : 65001 Date: 2018-11-15 09:05:08 */ SET FOREIGN_KEY_CHECKS=0; ...
INSERT INTO department (name) VALUES ("Accounting"), ("Finance"), ("Sales"), ("Engineering"); INSERT INTO role (title, salary, department_id) VALUES ('Sales Lead', 100000, 1), ('Salesperson', 80000, 1), ('Lead Engineer', 150000, 2), ('Software Engineer', 120000, 2), ('Acc...
<gh_stars>10-100 /**************************************************** ORACHKSUM - Oracle Database Integrity Checker ****************************************************/ -- Optional parameter if output is not current folder -- DEF moat369_pre_sw_output_fdr = './output' @@moat369/sql/moat369_0a_main.sq...
<reponame>3dcitydb/energy-ade-citydb<gh_stars>1-10 -- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-10-08 13:50:33 -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- *********************************** Create ...
<filename>oci-test/tests/oci_dns_zone/test-list-query.sql select name, id, lifecycle_state from oci.oci_dns_zone where name = '{{ resourceName }}';
<filename>ambassador-storage/src/integrationTest/resources/sql/indexing_data_for_select.sql /* IN PROGRESS */ /* and locked*/ INSERT INTO indexing (indexing_lock, started_by, started_date, status, target, source) VALUES (gen_random_uuid(), 'test', current_timestamp, 'IN_PROGRESS', '__ALL__', 'any'); INSERT INTO indexin...
<filename>dfc-coursedirectory/dbo/Stored Procedures/up_UKRLP_Course_Directory_Migration.sql<gh_stars>0  CREATE PROCEDURE [dbo].[up_UKRLP_Course_Directory_Migration] AS DECLARE @venues TABLE(PROVIDER_ID int, VENUE_ID int, VENUE_NAME nvarchar(255), PROV_VENUE_ID nvarchar(255), PHONE nvarchar(30), ADDRESS_1 nva...
DROP TABLE Concepts; CREATE TABLE Concepts ( Id int IDENTITY(1,1) NOT NULL, Pxordx varchar(5), Oldpxordx varchar(5), CodeType varchar(20), Concept_Class_Id varchar(100), Concept_Id int NULL, Vocabulary_Id varchar(100), Domain_Id varchar(100), Track varchar(100), Standard_Concept varchar(20), ...
ALTER TABLE `heroes` ADD COLUMN `claimed` ENUM('true','false') NOT NULL DEFAULT 'false' AFTER `played`;
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 100411 Source Host : localhost:3306 Source Schema : q1 Target Server Type : MySQL Target Server Version : 100411 File Encoding : 65001 Date: 10/10/2020 08:10...
-- View: bloomreader.v_number_pages_read_by_book -- DROP VIEW bloomreader.v_number_pages_read_by_book; CREATE OR REPLACE VIEW bloomreader.v_number_pages_read_by_book AS select book_title, sum(pages_read_audio) as number_audio_pages_played, sum(pages_read_nonaudio) as number_nonaudio_pages_read, book_bran...
/* SQLyog Community v12.2.4 (64 bit) MySQL - 5.5.50 : Database - inventry ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHE...
CREATE TABLE person ( id UUID PRIMARY KEY, name VARCHAR NOT NULL, data JSON )
-- file:plpgsql.sql ln:3660 expect:true select vari(3,4,5)