sql
stringlengths
6
1.05M
<reponame>dbmdz/digitalcollections-cms ALTER TABLE collections ADD COLUMN publication_start DATE; ALTER TABLE collections ADD COLUMN publication_end DATE;
<filename>Chapter06/spring-boot-spring-security-oauth-autoconfig/src/main/resources/data-h2.sql insert into MOVIE (id, title , genre) values (1, 'Moonlight', 'Drama');
DELETE FROM Religions WHERE Type = 'RELIGION_BUDDHISM'; DELETE FROM Religions WHERE Type = 'RELIGION_CHRISTIANITY'; DELETE FROM Religions WHERE Type = 'RELIGION_CONFUCIANISM'; DELETE FROM Religions WHERE Type = 'RELIGION_HINDUISM'; DELETE FROM Religions WHERE Type = 'RELIGION_ISLAM'; DELETE FROM Religions WHERE Type = ...
<reponame>metas-fresh/fresh<gh_stars>1-10 -- 2022-03-18T18:13:52.229Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_List SET Value='R',Updated=TO_TIMESTAMP('2022-03-18 19:13:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=543127 ; -- 2022-03-18T18:14:09.393Z -- I forgo...
/* Copyright (C) 2015 IASA - Institute of Accelerating Systems and Applications (http://www.iasa.gr) 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...
<gh_stars>0 # --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table attraction ( id bigint auto_increment not null, name varchar(255), visit_count varchar(255), working_time...
<reponame>Sluteng/xdlen /* MySQL Database Backup Tools Server:xdm721917388.my3w.com: Database:xdm721917388_db Data:2020-01-21 13:45:51 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for tp_about -- ---------------------------- DROP TABLE IF EXISTS `tp_about`; CREATE TABLE `tp_about` ( ...
BEGIN; DROP TABLE IF EXISTS public.users; DROP INDEX IF EXISTS unique_users_email; DROP INDEX IF EXISTS unique_users_login; DROP TABLE IF EXISTS public.orgs; DROP INDEX IF EXISTS unique_orgs_name; DROP INDEX IF EXISTS unique_orgs_login; DROP INDEX IF EXISTS idx_orgs_provider; DROP TABLE IF EXISTS public.repos; DROP ...
<filename>backend/dbtoaster/examples/queries/tpch/query18a.sql INCLUDE './examples/queries/tpch/schemas.sql'; SELECT c.custkey, sum(l1.quantity) AS query18 FROM customer c, orders o, lineitem l1 WHERE 1 <= (SELECT sum(1) FROM lineitem l2 WHERE l1.orderkey = l2.orderkey AND 100 < (SELECT sum(l3.quan...
<reponame>ThilinaManamgoda/testgrid -- -- Table structure for table `infrastructure_parameter` -- DROP TABLE IF EXISTS `infrastructure_parameter`; CREATE TABLE `infrastructure_parameter` ( `id` varchar(36) NOT NULL, `created_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `modified_timestamp` timestamp...
<reponame>loujine/musicbrainz-server \set ON_ERROR_STOP 1 BEGIN; DROP TABLE work_lastmod; CREATE SCHEMA sitemaps; SET search_path = 'sitemaps'; CREATE TABLE control ( last_processed_replication_sequence INTEGER, overall_sitemaps_replication_sequence INTEGER, building_overall_sitemaps ...
<reponame>blturner/jellyroll<filename>src/jellyroll/evolutions/item_url_max_length.sql ALTER TABLE jellyroll_item ALTER COLUMN url TYPE varchar(1000);
<filename>migrations/committed/000004.sql<gh_stars>0 --! Previous: sha1:d1ba26336d313bc04ae26a6165acb062bff42ed5 --! Hash: sha1:4f5984e9607708d260e82c3d4c3ba643a18aea47 -- Enter migration here create index on beachvolley_public.invitation(match_id);
CREATE TABLE statsglobales ( id_statsglobales SERIAL PRIMARY KEY NOT NULL, stock CHARACTER VARYING, codeCommuneEtablissement CHARACTER VARYING, activitePrincipaleEtablissement CHARACTER VARYING, trancheEffectifsEtablissement CHARACTER VARYING, siret DECIMAL(15,2), nb_actif DECIMAL(15,2), ...
--Stored Procedure: functional programming in SQL sp_help 'Music.Artist' sp_rename 'Music.Albums', 'Album' sp_helptext 'sp_rename' create proc sp_getArtistDetailsByID @id int as begin select ar.artistName, ar.age, al.albumName, al.numOfSongs from Music.Artist as ar left join Music.Album as al on ar.artistID = al.arti...
INSERT INTO issuer (type, person) VALUES (1, 1), /*Kohl*/ (2, 10), /*de Gaule*/ (2, 9) /*Cirac*/ ;
DROP PROCEDURE IF EXISTS mindsurf.SELECT_IDEAS_ONTOP; DELIMITER // CREATE PROCEDURE mindsurf.SELECT_IDEAS_ONTOP ( IN user_id INT UNSIGNED, IN top_of_id INT UNSIGNED ) BEGIN SELECT id,idea,reference,tag_id,timestamp FROM mindsurf.IDEA WHERE IDEA.user_id=user_id AND IDEA.id>top_of_id; END // DELIMITER ;
<reponame>yohhandalvi/flow -- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 11, 2020 at 01:42 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+...
<gh_stars>0 SELECT c.`id`, c.`name`, SUM(p.`points`) AS `maximum_points` FROM `contests` AS c INNER JOIN `problems` AS p ON c.`id` = p.`contest_id` GROUP BY c.`id` ORDER BY `maximum_points` DESC , c.`id` ASC;
<reponame>MTES-MCT/monitorenv<filename>datascience/src/pipeline/queries/cross/situ_med_areas.sql SELECT ogc_fid, wkb_geometry, libelle FROM prod.situ_med_areas
<reponame>navikt/helse-spesialist DELETE FROM risikovurdering_begrunnelse; DELETE FROM risikovurdering;
SELECT *, SAFE_DIVIDE(feedback_available, #calculate various metrics which are proportions of other metrics. SAFE_DIVIDE handles the legitimate cases where the denominator is zero, passing null instead of failing in these cases. vacancies_published) AS response_rate, SAFE_DIVIDE(hires_through_tv, feedback...
-- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64) -- -- Host: localhost Database: ClusterCockpit -- ------------------------------------------------------ -- Server version 8.0.22 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ...
<reponame>indrajithbandara/prizma-backend<filename>src/sql/example.sql select * from apa_prijimatelia where obec='{q}'
<reponame>DanielOliver/SqlServerScripts<gh_stars>1-10 --########################################################### --Contributor: unknown --Usage: Find job_id from the first select results. --Results: Returns a string containing the Create Temp Table of the SProcs' contents. --########################################...
<gh_stars>1-10 DROP TABLE `[#DB_PREFIX#]edm_unsubscription`; DELETE FROM `[#DB_PREFIX#]system_setting` WHERE `varname` = 'request_route'; DELETE FROM `[#DB_PREFIX#]system_setting` WHERE `varname` = 'request_route_sys_1'; DELETE FROM `[#DB_PREFIX#]system_setting` WHERE `varname` = 'request_route_sys_2'; DELETE FRO...
CREATE TABLE arbiter_data.job_tokens( id BINARY(16) NOT NULL, token VARCHAR(256) NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, modified_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), FOREIGN KEY (id) REFERENCES users(id) ON DELETE...
<filename>content/berkas/sql/3402_1475655394.sql INSERT INTO tweb_apbd(`berkas_id`,`lembaga_id`, `lembaga_kode`, `wilayah_kode`,`tahun`, `rekening_kode`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES ('327','211','1.20....
<reponame>georgetown-analytics/DC-Bikeshare<gh_stars>10-100 SELECT cabi_trips.*, start_st.region_code AS start_region_code, start_st.ngh_names AS start_ngh_names, start_st.anc AS start_anc, start_st.ward AS start_ward, end_st.region_code AS end_region_code, end_st.ngh_names A...
/* * Copyright (c) 2020. * Designed and developed by <NAME> * Use according to the license guidelines. * Contact me: <EMAIL> */ CREATE USER `test`@`%` IDENTIFIED WITH mysql_native_password BY '<PASSWORD>' PASSWORD EXPIRE NEVER; GRANT Alter, Alter Routine, Create, Create Routine, Create Temporary Tables, Create Us...
/* interactive-complex-5 */ select f.f_title from person p1 JOIN (knows k1 JOIN (knows k2 JOIN (person p2 JOIN (forum_person fp JOIN (forum f JOIN message m ON f.f_forumid=m.m_ps_forumid) ON fp.fp_forumid=f.f_forumid) ON p2.p_person...
<reponame>VitorGouveia/E-commerce -- CreateTable CREATE TABLE "Dimension" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "item_id" INTEGER NOT NULL, "weight" INTEGER NOT NULL, "length" INTEGER NOT NULL, "height" INTEGER NOT NULL, "width" INTEGER NOT NULL, "diameter" INTEGER NOT NULL, ...
<filename>Config/create_tb.sql # 创建账号表 CREATE TABLE IF NOT EXISTS `tb_account` ( `id` INT(11) AUTO_INCREMENT NOT NULL COMMENT "表唯一id 主键", `loginname` VARCHAR(50) NOT NULL COMMENT "玩家注册登录名", `loginpwd` VARCHAR(50) NOT NULL COMMENT "玩家注册登录密码", `gameid` CHAR(30) NOT NULL COMMENT "游戏账号", `openid` CHAR(30) NOT NULL,...
------------------------------------------------------------------- -- Seed data for Prison Activities (PRISON_ACT) Scheduled Events -- ------------------------------------------------------------------- -- COURSE_ACTIVITIES (Course activity definition) INSERT INTO COURSE_ACTIVITIES (CRS_ACTY_ID, CASELOAD_ID, AGY_LOC...
CREATE TABLE `essentialmode`.`blackout` ( `enabled` INT(2) NOT NULL DEFAULT '0' ) ENGINE = InnoDB; INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('blackout', 'Blackout', '-1', '0', '1');
<filename>Sisteme de Gestiune a Bazelor de Date (SGBD)/Laborator/sqldeveloper/dataminer/scripts/revokeSHGrants.sql -------------------------------------------------------------------------------- -- Revokes select privs on SH data from user. -- -- Parameters: -- 1. User account - account to drop views and tables on --...
CREATE TABLE [dbo].[GenericResource] ( [resourceId] UNIQUEIDENTIFIER NOT NULL, [mediaType] VARCHAR (255) COLLATE SQL_Latin1_General_CP1_CI_AS CONSTRAINT [DF_GenericResource_mediaType] DEFAULT ('image') NOT NULL, [size] INT CONSTRAINT [DF_GenericResource_size] DEFAULT ((0)) NOT NULL, ...
CREATE TABLE Highest_education( id INTEGER NOT NULL PRIMARY KEY ,degree VARCHAR(36) NOT NULL ,value INTEGER NOT NULL ); INSERT INTO Highest_education(id,degree,value) VALUES (0,'Postgraduate Degree',9); INSERT INTO Highest_education(id,degree,value) VALUES (1,'Graduate Diploma or Certificate',8); INSERT ...
select 'prod' from dual;
<gh_stars>0 INSERT INTO burgers (burger_name, devoured) VALUES ("Double Patty", false), ("Bacon & Cheddar", false), ("Mushroom & Provolone", true);
-- MySQL dump 10.13 Distrib 8.0.23, for Linux (x86_64) -- -- Host: localhost Database: QuanLySuDungDien -- ------------------------------------------------------ -- Server version 8.0.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT...
<gh_stars>0 'https://www.hackerrank.com/challenges/japanese-cities-attributes/problem?h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen' SELECT * FROM CITY WHERE COUNTRYCODE='JPN';
// Create Tables TABLE saas_category as category { catid SMALLINT [pk, increment, not null] catgroup VARCHAR catname VARCHAR catdesc VARCHAR } TABLE saas_event as event { eventid INT [pk, increment, not null] venueid SMALLINT [not null] catid SMALLINT [not null] dateid SMALLINT [not null] eventname VA...
CREATE OR REPLACE VIEW snowalert.rules.SERVER_MISSING_OSQUERY_AGENT_VIOLATION_QUERY AS SELECT OBJECT_CONSTRUCT('cloud', 'aws', 'deployment', MAP.DEPLOYMENT, 'account', MAP.ACCOUNT_ALIAS) AS environment , instances AS object , 'Server Missing Osquery Agent' AS title , current_timestamp() AS alert_time ...
<reponame>pydemo/spv_14.4 select string_7, string_8 from nulls3 where string_8 like '0%' 0|000 1|001 2|002 3|003 4|004 5|005 6|006 7|007 8|008 9|009 |021 |023 |025 |027 |029 |031 |033 |035 |037 |039 |041 |043 |045 |047 |049 |051 |053 |055 |057 |059 |061 |063 |065 |067 |069 |071 |073 |075 |077 |079 |081 |083 |085 |087 |...
<reponame>MooNkirA/wanxinp2p-project DROP DATABASE IF EXISTS `product_db_2`; CREATE DATABASE `product_db_2` CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'; USE `product_db_2`; DROP TABLE IF EXISTS `product_descript_1`; CREATE TABLE `product_descript_1` ( `id` BIGINT(20) NOT NULL COMMENT 'id', `product_info_id` BIGIN...
<reponame>maximazarkov/job4j_junior -- Автор Азарков <NAME> -- Версия 2020-12-28 v.0.1 -- Создадим новую БД для заявок CREATE DATABASE attaches;
<gh_stars>1-10 -- CHECKS SPOTIFY TRACK DATA -- Gets SPOTIFY TRACK/RELEASE/ARTIST IDs with mixradio ISRCs OR spotify track ID. -- API Parameters: ISRC, TRACK IDs (when available) -- API REQUEST: https://api.spotify.com/v1/tracks/isrc:ISRC -- OR: https://api.spotify.com/v1/tracks/SPOTIFY_TRACK_ID -- Manifest Col...
<filename>src/main/resources/database/oracle/alter_16_0_0_to_16_0_5.sql -- VFS create table o_vfs_statistics ( id number(20) generated always as identity, creationdate timestamp not null, f_files_amount number(20) default 0, f_files_size number(20) default 0, f_trash_amount number(20) default 0, f_tra...
<reponame>WentaoJin/transferdb /* oracle table type is different from mysql table type ┌──────────────────────┬───────────┬────────┬───────┬───────────────┐ │ TABLE │ PARTITION │ ORACLE │ MYSQL │ SUGGEST │ ├──────────────────────┼───────────┼────────┼───────┼───────────────┤ │ LIST_PARTITION_TABLE...
<reponame>jleiva-gap/Ed-Fi-Analytics-Middle-Tier -- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. ...
SELECT s_i_id, sum(s_order_cnt) AS ordercount FROM stock, supplier, nation WHERE mod((s_w_id * s_i_id), 10000) = su_suppkey AND su_nationkey = n_nationkey AND n_name = 'Germany' GROUP BY s_i_id HAVING sum(s_order_cnt) > (SELECT sum(s_order_cnt) * .005 FROM stock, supplier, nati...
<reponame>ngalaiko/sturdy<filename>api/pkg/db/migrate/schema/migrations/000180_comment_old_path.down.sql<gh_stars>100-1000 ALTER TABLE comments DROP COLUMN old_path;
-- preSHA1sum: b1387d808800a5969f0aa9bcae2d89a0d0b4620b -- postSHA1sum: 55df89fd956a03d637b52d13281bc252896f602f create table nochntest (foo text);
-- +migrate Up ALTER TABLE accounts ADD COLUMN is_registration BOOLEAN, ADD CONSTRAINT unique_registration unique (profile_id, is_registration); -- +migrate Down ALTER TABLE accounts DROP COLUMN registration, DROP CONSTRAINT unique_registration;
<reponame>rinnyB/vector-datasource CREATE INDEX ne_50m_land_wayarea_index ON ne_50m_land(way_area);
<filename>world/tables/country.sql CREATE TABLE country ( code CHAR(3) NOT NULL, name TEXT NOT NULL, continent TEXT NOT NULL, region TEXT NOT NULL, surface_area REAL NOT NULL, indep_year SMALLINT, population INTEGER NOT NULL, life_expectancy REAL, gnp NUMERIC(10, 2), gnp_old NUMERIC(10, 2), local_...
 CREATE VIEW [HumanResources].[vJobCandidateEducation] AS SELECT jc.[JobCandidateID] ,[Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; (Edu.Level)[1]', 'nvarchar(max)') AS [Edu.Level] ,CONVERT(datetime, REPLACE([...
<filename>Administratives-China(Street)-1.sql /* * _____ ______ * /_ / ____ ____ ____ _________ / __/ /_ * / / / __ \/ __ \/ __ \/ ___/ __ \/ /_/ __/ * / /__/ /_/ / / / / /_/ /\_ \/ /_/ / __/ /_ * /____/\____/_/ /_/\__ /____/\____/_/ \__/ * ...
/*Provide a query showing Customers (just their full names, customer ID and country) who are not in the US.*/ /*Map*/ SELECT c.FirstName, c.LastName, c.CustomerId, c.Country /*What tables*/ FROM Customer c /*Filter*/ WHERE c.Country != 'USA'
---------------------------------------------------------- --- inb SELECT sum(tt.ERP_ORDER_LINE_NUM * TOTAL_QTY) as 'orderL*tt_qty', count(distinct item) as 'item_distinct', sum(tt.ERP_ORDER_LINE_NUM) as 'tt_qty' from (SELECT RD.DATE_TIME_STAMP, RH.WAREHOUSE, RD.COMPANY, RH.RECEIPT_ID, ...
DROP TABLE locations, weathers, restaurants, movie; CREATE TABLE IF NOT EXISTS locations ( id SERIAL PRIMARY KEY, search_query VARCHAR(255), formatted_query VARCHAR(255), latitude NUMERIC(8, 6), longitude NUMERIC(9, 6) ); CREATE TABLE IF NOT EXISTS weathers ( id SERIAL PRIMARY K...
-- PostgreSQL database dump -- -- Dumped from database version 9.0.3 -- Dumped by pg_dump version 9.0.3 -- Started on 2013-02-11 13:57:30 EST SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape...
<reponame>Sleeya/DatabasesBasics-MSSQL-Server USE SoftUni SELECT TOP (50) e.EmployeeID,CONCAT(e.FirstName,' ',e.LastName) AS EmployeeName, CONCAT(em.FirstName,' ',em.LastName) AS ManagerName, d.Name AS DepartmentName FROM Employees AS e JOIN Employees AS em ON e.ManagerID = em.EmployeeID JOIN Departments AS d ...
<reponame>Artsdatabanken/forvaltningsportal<gh_stars>1-10 -- Slett eksisterende data DELETE FROM kart WHERE datasettkode='DTM'; DELETE FROM datasett WHERE datasettkode='DTM'; -- Sett inn nye INSERT INTO datasett VALUES ('DTM', 'Terrengmodell'); CREATE OR REPLACE FUNCTION elevasjon(lng numeric, lat numeric) RETURNS j...
TRUNCATE TABLE DimSalesTerritory; BEGIN; INSERT INTO DimSalesTerritory(SalesTerritoryKey, SalesTerritoryAlternateKey, SalesTerritoryRegion, SalesTerritoryCountry, SalesTerritoryGroup) SELECT 1, 1, 'Northwest', 'United States', 'North America' FROM DUAL UNION ALL SELECT 2, 2, 'Northeast', 'United States', 'North Ameri...
<gh_stars>1-10 CREATE TABLE IF NOT EXISTS houses ( id BIGINT NOT NULL PRIMARY KEY, objectid BIGINT NOT NULL, objectguid UUID NOT NULL, changeid BIGINT NOT NULL, housenum VARCHAR(50), addnum1 VARCHAR(50), addnum2 VARCHAR(50), housetype INT, addtype1 INT, addtype2 INT, opertype...
<reponame>godtaehee/aurora-relayer DROP FUNCTION IF EXISTS eth_getTransactionByBlockHashAndIndex(hash, int) RESTRICT; CREATE FUNCTION eth_getTransactionByBlockHashAndIndex(block_hash hash, transaction_index int) RETURNS transaction_result AS $$ DECLARE result transaction_result; BEGIN SELECT b.id AS "blockNu...
-- phpMyAdmin SQL Dump -- version 4.2.5 -- http://www.phpmyadmin.net -- -- Host: localhost:8889 -- Generation Time: Apr 13, 2015 at 03:52 AM -- Server version: 5.5.38 -- PHP Version: 5.5.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `SS_tutorial` -- -- -------------------------...
create table migrations ( id TEXT, dirty boolean, up TEXT, down TEXT, )
<reponame>hgautam/hub<filename>database/migrations/functions/users/register_password_reset_code.sql -- register_password_reset_code registers a password reset code for the user -- identified by the email provided. create or replace function register_password_reset_code(p_email text) returns bytea as $$ declare v_co...
create database students; show databases; use students; select database(); create table student( sname varchar(100), age int ); create table teacher( tname varchar(100), age int ); create table pastries( name varchar(50), quantity int ); show tables; desc pastries; desc teacher; drop table pastries; show co...
<gh_stars>0 -- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. PRINT N'Adding foreign keys to [edfi]....
<reponame>AlikJoke/CSCM-App CREATE OR REPLACE VIEW V_CM_R_CASHIN_R_DENOM_STAT ( ATM_ID, CASH_IN_ENCASHMENT_ID, DENOM_CURR, DENOM_VALUE, DENOM_COUNT_IN, DENOM_COUNT_OUT, DENOM_TRANS_COUNT_IN, DENOM_TRANS_COUNT_OUT, CURR_TRANS_COUNT_IN, CURR_TRANS_COUNT_OUT, ENC_DATE, ENC_DATE_TO, L...
-- V0.0002_add_gov_tables.sql CREATE TABLE digilog.loc_gov_ch( id serial NOT NULL PRIMARY KEY, url varchar, status int, latitude_n decimal, longitude_e decimal, population int, elevation varchar, area varchar, postalcode varchar, gdekt varchar, gdebznr int, gdenr int, gdename varchar, gdenamk v...
<filename>darwin-core/src/test/resources/darwin/versioned/2.1.3-RC2.sql<gh_stars>1-10 This is 2.1.3-RC2.sql
<gh_stars>1-10 alter table users add column country varchar(50); alter table users add column city varchar(50); create table country( id serial primary key not null, title varchar(50) unique ); create table city( id serial primary key not null, title varchar(50) unique, country_id integer references country...
-- This file and its contents are licensed under the Timescale License. -- Please see the included NOTICE for copyright information and -- LICENSE-TIMESCALE for a copy of the license. -- initialize the bgw mock state to prevent the materialization workers from running \c :TEST_DBNAME :ROLE_SUPERUSER -- remove any def...
<filename>src/main/resources/data.sql drop table if exists compass_decision_table; create table compass_decision_table( id varchar(120) not null primary key, name varchar(120), description varchar(512), input_variables_json varchar(2048), output_variables_json varchar(2048), rules_json varchar(2048), status varchar(24...
<filename>running examples/exp/tpch-exp/tpch-query/q1/12.sql select /*+ NO_INDEX(orders) NO_INDEX(lineitem)*/ l_shipmode, sum(case when o_orderpriority = '1-URGENT' or o_orderpriority = '2-HIGH' then 1 else 0 end) as high_li...
create database if not exists test_db; use test_db; drop table if exists test_forward_with_binary_and_varbinary; create table if not exists test_forward_with_binary_and_varbinary(id int primary key auto_increment, f1 binary(16), f2 binary(64), f3 varbinary(3), f4 varbinary(1024), f5 float, column1 varchar(256)); inse...
SELECT title, summary FROM film WHERE LOWER(summary) LIKE '%vincent%' ORDER BY id_film;
INSERT INTO `study` (`request_number`, `description`, `date`, `doctor_id`, `serial_number`, `manufacturer`) VALUES ('1', 'LDL cholesterol analysis', '2017-12-15', '1', 'a87S17UT6b', 'Medtronic') -- ERROR 1644 (45000): That doctor cannot perform the exam. UPDATE `study` SET `doctor_id` = '1' WHERE `study`.`request_...
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 100138 Source Host : localhost:3306 Source Schema : aclcbu_web Target Server Type : MySQL Target Server Version : 100138 File Encoding : 65001 Date: 23/05/20...
<reponame>ancka019/DB-practice<gh_stars>0 --1 SELECT Mark FROM Order1, (SELECT Spec, Employee_ID FROM Employee WHERE Spec = 'student') As eee WHERE Order1.Employee_ID = eee.Employee_ID and Is_Done = 1; --2 SELECT Last_Name FROM Person JOIN Employee ON Employee.Person_ID = Person.Person_ID WHERE Employee_ID NOT IN (S...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Dec 31, 2018 at 08:23 AM -- Server version: 5.7.23 -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
ALTER TABLE `dones_object` ADD COLUMN `api_date` DATE NULL DEFAULT NULL COMMENT 'Объект: дата установки АПИ (физ.лицо)' AFTER `object_roof`, ADD COLUMN `id_api_source` INT NOT NULL DEFAULT '0' COMMENT 'Объект: источник финансирования для установки АПИ (физ.лицо) = api_source.id' AFTER `api_date`, ADD COLUMN `is_api_...
CREATE TABLE posts (internal_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE NOT NULL, name VARCHAR (256) NOT NULL, shortlink VARCHAR (16) UNIQUE, uuid VARCHAR (36) UNIQUE NOT NULL, created DATE NOT NULL, category1 VARCHAR (32), category2 VARCHAR (32), category3 VARCHAR (32), category4 VARCHAR (32), category5 VARCHAR (32))...
<reponame>miguelgalindez/PQRSF -- phpMyAdmin SQL Dump -- version 4.2.12deb2+deb8u2 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 17-01-2017 a las 04:23:37 -- Versión del servidor: 5.5.52-0+deb8u1 -- Versión de PHP: 5.6.27-0+deb8u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone ...
SET DEFINE OFF; CREATE INDEX AFW_12_ATRIB_STRUC_APLIC_FK3 ON AFW_12_ATRIB_STRUC_APLIC (REF_ATRIB_STRUC_APLIC) LOGGING /
DROP DATABASE IF EXISTS composizioneclassi; CREATE DATABASE composizioneclassi CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; USE composizioneclassi; CREATE TABLE utenti( id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(64) NOT NULL, hashed_password CHAR(64) NOT NULL, salt CHAR(32) NOT NULL, diritti ...
CREATE TABLE mytable ( -- int 类型,不为空,自增 id INT NOT NULL AUTO_INCREMENT, -- int 类型,不可为空,默认值为 1,不为空 col1 INT NOT NULL DEFAULT 1, -- 变长字符串类型,最长为 45 个字符,可以为空 col2 VARCHAR(45) NULL, -- 日期类型,可为空 col3 DATE NULL, -- 设置主键为 id PRIMARY KEY id );
create database Movies Go use Movies Go create table Directors ( Id int primary key identity not null, DirectorName nvarchar(255), Notes nvarchar(255) ); create table Genres ( Id int primary key identity not null, GenreName nvarchar(255), Notes nvarchar(255) ); create table Categories ( Id int primary key...
<reponame>faros-ai/airbyte<gh_stars>10-100 {{ config( cluster_by = "_airbyte_emitted_at", partition_by = {"field": "_airbyte_emitted_at", "data_type": "timestamp", "granularity": "day"}, unique_key = '_airbyte_ab_id', schema = "_airbyte_test_normalization", tags = [ "top-level-intermediate" ] ) }} -...
SELECT GREATEST(1, 2 + 7, SQRT(a.long_variable_name_of_some_kind)) AS first_one, GREATEST( 2 / 3.4322348982348, 5 + 6, SQRT(a.nother_long_variable_name_of_some_kind) ) AS second_one FROM this_other_table
<filename>sql_querys/store_procedures.sql /* Procedure to insert supplies */ CREATE PROCEDURE dbo.validate_supplies_insert @sku_in varchar(250), @name_in varchar(700), @description_in varchar(MAX), @inventory_in int, @id_out int OUT AS BEGIN SELECT @id_out = s.id FROM dbo.supplies s W...
<reponame>AslanLM/SistemaClinica.BackEnd CREATE PROCEDURE SP_Doctores_Insertar @CedulaDoctor VARCHAR(12), @NombreDoctor VARCHAR(40), @Apellidos VARCHAR(60), @Telefono VARCHAR(12), @CreadoPor VARCHAR(60) AS BEGIN INSERT INTO Doctores (CedulaDoctor, NombreDoctor, Apellidos, Telefono, CreadoPor) VALUES (@Ced...
<reponame>datacentricity/log4tsql<filename>Log4TSql/Log4TSql_Common_Tests/CommonSchemaTests/test log4Private.Severity.Name unique key is unique.sql create procedure [CommonSchemaTests].[test log4Private.Severity.Name unique key is unique] as begin exec tSQLt.FakeTable @TableName = 'log4Private.Severity' ; exec tSQ...
-- list current file targets SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SELECT s.name as [session], st.execution_count, st.execution_duration_ms, CAST(st.target_data as xml).value('(/EventFileTarget/File)[1]/@name', 'nvarchar(max)') as [file] FROM sys.dm_xe_sessions s JOIN sys.dm_xe_session_targets st ON...
<filename>schema/2021-04-05.0.sql -- initial schema CREATE TABLE bookmark ( id INTEGER PRIMARY KEY, name TEXT, url TEXT UNIQUE, date DATETIME, description TEXT ); CREATE TABLE tag ( id INTEGER PRIMARY KEY, name TEXT UNIQUE ); CREATE TABLE tag_bookma...