sql
stringlengths
6
1.05M
<reponame>MalteSchledjewski/edacc_gui ALTER TABLE Solver ADD COLUMN `competition_frozen` TINYINT(1) NULL DEFAULT NULL AFTER `User_idUser`;
<reponame>octonion/soccer-w begin; create temporary table r ( rk serial, team text, school_id integer, div_id integer, year integer, str numeric(5,3), -- o_div numeric(5,3), -- d_div numeric(5,3), ofs numeric(5,3), dfs numeric(5,3), s...
SELECT objektnummer.t_id AS tid, objektnummer.objektnummer_von, objektnummer.nummer, objektnummer.gwr_egid, CAST(objektnummer.t_datasetname AS INT) AS gem_bfs, 0 AS los, aimport.importdate AS lieferdatum FROM agi_dm01avso24.einzelobjekte_objektnummer AS objektnummer LEFT JOIN agi_dm0...
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Май 14 2018 г., 15:51 -- Версия сервера: 10.1.30-MariaDB -- Версия PHP: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4010...
<gh_stars>1-10 /* Problem 1 Change the query shown so that it displays Nobel prizes for 1950.*/ SELECT yr, subject, winner FROM nobel WHERE yr = 1950 /* Problem 2 Show who won the 1962 prize for Literature.*/ SELECT winner FROM nobel WHERE yr = 1962 AND subject = 'Literature' /* Problem 3 Show the year...
CREATE INDEX IDX_EG_USER_USERNAME ON EG_USER (username); CREATE INDEX IDX_EG_USER_NAME ON EG_USER (name); CREATE INDEX IDX_EG_USER_ACTIVE ON EG_USER (active); CREATE INDEX IDX_EG_USER_MOBILE ON EG_USER (mobilenumber); CREATE INDEX IDX_EG_USER_TYPE ON EG_USER (type); CREATE INDEX IDX_EG_USER_UUID ON EG_USER (uuid); CREA...
<filename>db/sql/2036__alter_view_vipunentk_dw_R4_16.sql USE [VipunenTK_DW] GO /****** Object: View [dbo].[v_f_R4_16_Tyossakayvat_ammateittain] Script Date: 6.1.2019 19:40:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER VIEW [dbo].[v_f_R4_16_Tyossakayvat_ammateittain] AS /* Lauseet siirto...
<filename>test/sql/istore_io_test.sql BEGIN; -- bigistore istore_io should persist istores; -- ./spec/istore/istore_io_spec.rb:9; CREATE EXTENSION istore; CREATE TABLE istore_io AS SELECT '-2147483647 => 10, -10 => -9223372036854775807, 0 => 5, 10 => 9223372036854775806, 2147483647 => 10'::bigistore; SELECT * FROM isto...
<gh_stars>1-10 CREATE TABLE db.gps_log (time BIGINT UNSIGNED, tid VARCHAR(2),lat DECIMAL(10, 8) NOT NULL, lon DECIMAL(11, 8) NOT NULL, accuracy SMALLINT UNSIGNED, at_home BOOLEAN, distance_home DOUBLE, PRIMARY KEY (time, tid)); CREATE TABLE db.test (distance_home DOUBLE, PRIMARY KEY (distance_home));
-- determines if patients received any dialysis during their stay -- Some example aggregate queries which summarize the data here.. -- This query estimates 6.7% of ICU patients received RRT. -- select count(rrt.icustay_id) as numobs -- , sum(rrt) as numrrt -- , sum(case when rrt=1 then 1 else 0 end)*100.0 ...
ALTER TYPE workflow_execution ADD search_attributes map<text, blob>;
<filename>tests_corpus/valid/on-conflict.sql CREATE TABLE team( name text NOT NULL PRIMARY KEY ON CONFLICT IGNORE );
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
CREATE OR REPLACE VIEW mappa.ipsative_responses_grouped AS SELECT iq.survey_id ,ips.name ,ir.group_number ,ic.category ,sum(ir.points_assigned) FROM mappa.ipsative_responses ir JOIN mappa.ipsative_answers ia on ia.uuid = ir.answer_id JOIN mappa.ipsative_categories ic on ic.uuid = ia.category_id JOIN ma...
if not exists(select top 1 1 from sys.indexes where name=N'IX_{objectQualifier}prov_Membership_ApplicationID' and object_id=object_id(N'[{databaseOwner}].[{objectQualifier}prov_Membership]')) CREATE INDEX [IX_{objectQualifier}prov_Membership_ApplicationID] ON [{databaseOwner}].[{objectQualifier}prov_Membership]([Appl...
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64) -- -- Host: 172.16.17.32 Database: sys -- ------------------------------------------------------ -- Server version 5.7.19-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS...
<filename>Experiments/SQLCmdTest.1.1.sql IF OBJECT_ID('dbo.testproc') IS NOT NULL DROP PROCEDURE dbo.testproc;
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
CREATE PROCEDURE test_proc1() LANGUAGE pltcl AS $$ unset $$; CALL test_proc1(); CREATE PROCEDURE test_proc2() LANGUAGE pltcl AS $$ return 5 $$; CALL test_proc2(); CREATE TABLE test1 (a int); CREATE PROCEDURE test_proc3(x int) LANGUAGE pltcl AS $$ spi_exec "INSERT INTO test1 VALUES ($1)" $$; CALL test_proc3(55);...
-- @product_version gpdb: [4.3.4.0 -],4.3.4.0O2 -- @Description Ensures that a reindex table during alter tab add partition operations is ok -- DELETE FROM reindex_crtabforalter_part_aoco_btree WHERE id < 12; 1: BEGIN; 2: BEGIN; 1: REINDEX TABLE reindex_crtabforalter_part_aoco_btree; 2&: alter table reindex_crtabf...
<reponame>Serswii/yii2-project -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Мар 09 2020 г., 18:25 -- Версия сервера: 5.7.25 -- Версия PHP: 7.2.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00...
INSERT INTO `city` (`id`, `city_name`, `state_id`, `region_id`, `order_by`, `pin_code`) VALUES (2, '<NAME>', '1', 'WB', 9999, 0), (3, 'Adilabad', '2', 'AP', 9999, 0), (4, 'Anantapur', '2', 'AP', 9999, 0), (5, 'Chittoor', '2', 'AP', 9999, 0), (6, 'Eluru', '2', 'AP', 9999, 0), (7, 'Guntur', '2', 'AP', 9999, 0), (8, 'Hyd...
--create database mgdb;
INSERT INTO `dbbagsacorp`.`cuentasporpagar` ( `id`, `tipo`, `idproveedor`, `idfactura`, `referencia`, `tipopago`, `fecha`, `vencimiento`, `dias`, `valor`, `abono`, `saldo`, `concepto`, `formapago`, `banco`, `cuenta`, `cheque`, `fechacheque`, `tipocheque`, `diario`, `usuariocrea...
<gh_stars>1-10 -- [er]test '05/26/2008', '14:24:00', '14:24:00 05/26/2008' with parentheses select '05/26/2008'() from db_root; select '14:24:00'() from db_root; select '14:24:00 05/26/2008'() from db_root;
-- @testpoint: pg_get_triggerdef(oid) 描述:获取触发器的定义信息 --创建源表和触发表 drop table if exists test_tb_trigger_001; drop table if exists test_tb_trigger_002; create table test_tb_trigger_001(id1 int, id2 int, id3 int); create table test_tb_trigger_002(id1 int, id2 int, id3 int); --创建触发器函数 create or replace function tri_truncate...
-- Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License, version 2.0, as -- published by the Free Software Foundation. -- -- This program is also distributed with c...
<filename>catalog/view/theme/buyshop/sql/install_buyshop.sql DELETE FROM ?:extension WHERE `type` = 'module' AND `code` = 'affiliate'; DELETE FROM ?:setting WHERE `store_id` = '0' AND `group` = 'affiliate'; DELETE FROM ?:extension WHERE `type` = 'module' AND `code` = 'slideshow'; DELETE FROM ?:setting WHERE `store_id`...
CREATE TABLE [dbo].[EmployeeEducations] ( [Id] INT NOT NULL PRIMARY KEY, [EffectiveStartedOn] DATETIME NOT NULL, [EffectiveStartedBy] INT NOT NULL, [EffectiveModifiedOn] DATETIME NOT NULL, [EffectiveModifiedBy] INT NOT NULL, [EffectiveEndedOn] DATETIME NOT NULL, [EffectiveEndedBy] INT NOT NULL, [C...
<reponame>georgus/mundoplata -- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 24-06-2016 a las 10:14:34 -- Versión del servidor: 5.6.24 -- Versión de PHP: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
alter table users add column comp_name varchar(20) after name; alter table users add column area varchar(20) after comp_name; alter table users add column phone varchar(20) after password; alter table users add column workers_num int unsigned after phone; alter table users add column pcs_num int unsigned after work...
-- -- Create tables -- -- Stores information about users CREATE TABLE users ( user_uid SERIAL PRIMARY KEY, email text NOT NULL UNIQUE, password varchar(72) NOT NULL, administrator boolean DEFAULT FALSE, reset_key text DEFAULT NULL ); -- Stores information about...
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603676',@CutoffDate = N'2017-09-30',@EPS = N'0.21',@EPSDeduct = N'0',@Revenue = N'2.81亿',@RevenueYoy = N'-1.78',@RevenueQoq = N'-',@Profit = N'7715.84万',@ProfitYoy = N'-3.03',@ProfiltQoq = N'-',@NAVPerUnit = N'1.9700',@ROE = N'13.68',@CashPerUnit = N'0.0894',@GrossProfitRate = N'59....
<gh_stars>0 #Insert initial data insert into student(id, name) values (101, 'Mohan'); insert into student(id, name) values (102, 'Krishna');
<reponame>farid-maulana/dts-JuniorWebDeveloper<filename>management_kost/db/management_kost.sql -- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 16, 2020 at 10:28 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th8 09, 2020 lúc 02:28 AM -- Phiên bản máy phục vụ: 10.4.11-MariaDB -- Phiên bản PHP: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 07, 2019 at 06:22 AM -- Server version: 10.1.35-MariaDB -- PHP Version: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<filename>sql/terminaPrenotazioneProcedure.sql<gh_stars>0 DELIMITER | CREATE PROCEDURE TerminaPrenotazione (IN Email varchar(30), IN Auto varchar(10),OUT result BOOLEAN) BEGIN DECLARE TEMPO DATETIME DEFAULT NOW(); start transaction; SET result = (FALSE); IF EXISTS (SELECT * FROM PRENOT...
create table blocks ( id integer not null constraint blocks_pk primary key autoincrement, hash1 text, hash2 text, size integer, name text, location text );
ALTER TABLE `trz2_bolsas_confeccion` ADD UNIQUE INDEX `idx_linea_palet` (`linea` , `idpalet`); ALTER TABLE `trz2_bolsas_confeccion` ADD UNIQUE INDEX `idx_idpalet` (`idpalet`);
<filename>MyBD.sql -- -------------------------------------------------------- -- Хост: 127.0.0.1 -- Версия сервера: 5.7.20 - MySQL Community Server (GPL) -- Операционная система: Win32 -- HeidiSQL Версия: 9.5.0.5196 -- -----------------------------------------...
<reponame>kakei-akihiko/springboot-vuejs-template select /*%expand*/* from articles where /*%if @isNotBlank(param.lead) */ lead like /* @infix(param.lead) */'' /*%end*/ /*%if @isNotBlank(param.text) */ and text like /* @infix(param.text) */'' /*%end*/ /*%if @isNotBlank(param.title) */ and ...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 31, 2020 at 01:38 AM -- Server version: 10.4.16-MariaDB -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
INSERT INTO Location (Country, Volcanoes) VALUES ('Argentina', '57'), ('Ecuador', '47'), ('Russia', '192'); INSERT INTO Volcanoes (Name, LocationId, Height) VALUES ('Antofalla', '1', '6450'), ('Cotopaxi', '2', '5897'), ('Guallatiri', '1', '6060'), ('Sangay', '2', '5320'), ('...
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 27, 2013 at 10:21 PM -- Server version: 5.5.20 -- PHP Version: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `marc_record_loads` -- -- ------------...
-- Select rows from table 'Customers' SELECT * FROM dbo.Customers;
<reponame>emartinez06/anonychat<filename>table.sql CREATE TABLE `usernames` ( `uid` bigint(25) NOT NULL AUTO_INCREMENT PRIMARY KEY, `usernick` varchar(50) NOT NULL UNIQUE )
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema mydb -- -...
declare mystaleobjs dbms_stats.objecttab; begin -- check whether there is any stale objects dbms_stats.gather_schema_stats(ownname=>'JKSTILL', options=>'LIST STALE',objlist=> mystaleobjs); for i in 1 .. mystaleobjs.count loop dbms_output.put_line(mystaleobjs(i).objname); end loop; end; /
<gh_stars>1-10 -- URI Online Judge 2619 SELECT products.name, providers.name, products.price FROM products JOIN providers ON products.id_providers = providers.id JOIN categories ON products.id_categories = categories.id WHERE products.price > 1000 AND categories.name = 'Super Luxury'
CREATE TABLE house ( `id_serial` INT, `surface` DECIMAL(20,10), `type` TEXT, `garden` BOOLEAN, `garage` BOOLEAN, `ghosts` TEXT, `address` INT, PRIMARY KEY (`id_serial`) ); CREATE TABLE town ( `id` INT, `name` TEXT, `surface` INT, `city_hall` INT, PRIMARY KEY (`id`) ...
CREATE TABLE GamesInSeason ( gameId UUID REFERENCES game(gameId), seasonId UUID REFERENCES season(seasonId), PRIMARY KEY (gameId, seasonId) );
<gh_stars>1-10 create index index_queue_name on queue (name); create index index_queue_schedule on queue (schedule);
DROP TABLE IF EXISTS hmda_public.ts_2018; CREATE TABLE hmda_public.ts_2018 ( activity_year VARCHAR(4), calendar_quarter VARCHAR(1), lei VARCHAR(20), tax_id VARCHAR(10), agency_code VARCHAR(1), respondent_name VARCHAR, respondent_state VARCHAR(2), respondent_city VARCHAR, respondent_zip VARCHAR, lar_count VARC...
/* Dungeon Normal-Heroic for 5 people */ /* Trash Mobs */ -- Fel Orc Neophyte SET @ENTRY := 17429; UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,...
-- 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. ALTER PROCEDURE [dbo].[GetElementListPage] @Mappe...
<filename>tesco-database/tesco-ware.sql<gh_stars>100-1000 /* Navicat Premium Data Transfer Source Server : Docker-MySQL Source Server Type : MySQL Source Server Version : 50722 Source Host : 192.168.75.136:3306 Source Schema : tesco-ware Target Server Type : MySQL Target Server...
-- This script lists all shows contained in hbtn_0d_tvshows without a genre linked. SELECT tv_shows.title, tv_show_genres.genre_id FROM tv_shows LEFT JOIN tv_show_genres ON tv_shows.id = tv_show_genres.show_id WHERE tv_show_genres.genre_id IS NULL ORDER BY tv_shows.title;
INSERT INTO user (id, username, email, status, created_at, updated_at) VALUES (1, 'admin', '<EMAIL>', 10, 1503655397, 1570605268); INSERT INTO user (id, username, email, status, created_at, updated_at) VALUES (4034, 'rsalceda', '<EMAIL>', 10, 1505323818, 1558011859); INSERT INTO user (id, username, email, status, creat...
<gh_stars>1-10 // // nekRS User Defined File // #include <math.h> #include "udf.hpp" #include "plugins/velRecycling.hpp" #include "plugins/avg.hpp" #include "casedata.h" /* UDF Functions */ void UDF_LoadKernels(nrs_t *nrs) { velRecycling::buildKernel(nrs); av...
<filename>Lab_3/Exercise_03.sql -- 1. Wyświetl zamówienia dla których liczba pozycji zamówienia jest większa niż 5 SELECT OrderID FROM [Order Details] GROUP BY OrderID HAVING COUNT(*) > 5 -- 2. Wyświetl klientów dla których w 1998 roku zrealizowano więcej niż 8 zamówień (wyniki posortuj malejąco -- wg łącznej kwoty za...
/* * %FFILE% * * Created by %USER% on %YEAR%/%MONTH%/%DAY%. * Copyright (c) %YEAR%年 %USER% All rights reserved. */ select %HERE% -- vim:et
<reponame>tayrockafella/MiamProject<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Jul 26, 2020 at 08:46 PM -- Server version: 5.7.26 -- PHP Version: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database...
<gh_stars>0 create table t1( name varchar2(11), rno varchar2(5) primary key ) insert into t1 values('kaka','123') delete from t1 where rno=121 select * from t1 create table t2( rno varchar2(5) references t1(rno) on delete cascade, m number(3) ) ...
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jan 16, 2021 at 10:07 AM -- Server version: 5.7.32 -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
<gh_stars>0 CREATE TABLE [dbo].[PenaltyReaction] ( [Id] BIGINT IDENTITY(1, 1) NOT NULL, [PenaltyId] BIGINT NOT NULL, [MemberId] BIGINT NOT NULL, [ReactionId] BIGINT ...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 19, 2020 at 01:37 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 24, 2021 at 06:21 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<filename>exercise05/exercise5.sql /* Use the Chinook database. Read Chapter 6 of the book. */ -- Exercise 5 /* 1. Write a SELECT statement that returns the count of the number of artists in the artist table.*/ SELECT COUNT(*) AS Artist_Count FROM artist; /* 2. Write a SELECT statements that displays the highest...
insert into medaltable.medalshelf values ('london2012','Brazil (BRA)',3,5,9); insert into medaltable.medalshelf values ('london2012','Russia (RUS)',22,25,32); insert into medaltable.medalshelf values ('london2012','Iran (IRI)',4,5,3); insert into medaltable.medalshelf values ('london2012','China (CHN)',38,29,21); inser...
<gh_stars>1-10 set pagesize 5555 column dummy noprint column pct_used format 999.9 heading "%|Used" column name format a20 heading "Tablespace Name" column mbytes format 999,999,999 heading "MBytes" column used format 999,999,999 heading "Used" column fre...
<gh_stars>1-10 SELECT SUM(POPULATION) FROM CITY WHERE CountryCode = 'JPN';
<gh_stars>1-10 -- Z3.2 -- mbr, ime, prez svih stud. Ime i prez treba zajedno SELECT s.mbrStud, CONCAT(RTRIM(s.imeStud),' ',RTRIM(s.prezStud) ) AS 'Ime i prezime' FROM stud s GO -- Z3.3 -- ime svih stud samo jenom. poredati po abecedi silazno SELECT DISTINCT s.imeStud FROM stud s ORDER BY s.imeStud DESC GO -- Z3.3 ...
<filename>DatabaseFiles/Views/v_deviceCompliancePolicies_For_devicesStatuses.sql USE [Intune]; GO SET NOCOUNT ON; /*************************************************************************************************************************** Object: dbo.v_deviceCompliancePolicies_For_devicesStatuses History: Date ...
ALTER TABLE `admin_shift_assign` ADD `warned` TINYINT( 1 ) NOT NULL DEFAULT '0';
<filename>data/sql/galaxy/procedures/sp_UpdateDraftSchematics.sql /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; ...
<gh_stars>0 create table public.dept_emp ( emp_no INT NOT NULL , dept_no VARCHAR(5) NOT NULL , from_date DATE NOT NULL, to_date DATE NOT NULL, FOREIGN KEY (emp_no) REFERENCES public.employees(emp_no), FOREIGN KEY (dept_no) REFERENCES public.departments(dept_no) )
update c_invoiceline set ispackagingmaterial = 'Y' where m_product_id in (select m_product_id from m_product where m_product_category_ID = (SELECT value::numeric FROM AD_SysConfig WHERE name = 'PackingMaterialProductCategoryID') );
<filename>sql/practice/dbms_lab_1sol.sql --- Table-DEPT CREATE TABLE DEPT ( DEPTNO NUMBER(2) Primary Key, DEPTNAME VARCHAR2(14) ); INSERT INTO dept VALUES (10,'Accounting'); INSERT INTO dept values (20,'Research'); INSERT INTO dept values ( 30,'Sales' ); INSERT INTO dept values (40,'Operation...
DROP DATABASE IF EXISTS spruceDB; CREATE DATABASE spruceDB; USE spruceDB;
# --- Created by Slick DDL # To stop Slick DDL generation, remove this comment and start using Evolutions # --- !Ups create table "PLATFORMS" ("ID" BIGSERIAL PRIMARY KEY,"NAME" VARCHAR(254) NOT NULL,"UPDATED_AT" timestamp default now() NOT NULL,"CREATED_AT" timestamp default now() NOT NULL); create table "PRODUCTS" (...
-- ---------------------------------------------------------------------------- -- psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" -- ---------------------------------------------------------------------------- -- ---------------------------------------------------------------------------- ...
<reponame>econmed/ImageServer20 SET NUMERIC_ROUNDABORT OFF GO SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON GO IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors GO CREATE TABLE #tmpErrors (Error int)...
<filename>sql/fieldmapper.sql<gh_stars>1-10 -- drop the table if it exists DROP TABLE IF EXISTS fieldmapper; -- and create the new one CREATE TABLE fieldmapper( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, field_class VARCHAR( 32 ) NOT NULL DEFAULT '', field_name VARCHAR( 255 ) NOT NULL DEFAULT '', ...
<filename>gateway/gateway-admin/src/main/db/dml/gateway_dml.sql --用户 INSERT INTO gateway_route (id, route_id, uri, predicates, filters, orders, description, status, created_time, updated_time, created_by, updated_by) VALUES (101, 'authorization-server', 'lb://authorization-server:8000', '[{"name":"Path","arg...
<filename>migrations/000001_create_users_table.up.sql CREATE TABLE users ( id CHAR(20) PRIMARY KEY, username VARCHAR(32) NOT NULL UNIQUE, display_name VARCHAR(32), password_hash BYTEA NOT NULL, public_key BYTEA NOT NULL );
<gh_stars>1-10 ALTER TABLE authors ADD CONSTRAINT test_unique_constraint UNIQUE (email) DEFERRABLE INITIALLY DEFERRED ALTER TABLE authors DROP CONSTRAINT test_unique_constraint DROP INDEX
<reponame>sahapasci/dba.postgresql<filename>dba.v_dublicate_indexes.sql CREATE VIEW dba.v_dublicate_indexes AS SELECT rank() OVER (ORDER BY schema_name, table_name) AS grp, schema_name, table_name, unnest(index_names) AS index_names, unnest(index_sizes) AS index_sizes FROM ( SELECT ...
<gh_stars>0 drop function dbo.pGetCategoryArticles(varchar, integer, integer); CREATE OR REPLACE FUNCTION dbo.pGetCategoryArticles ( CatURL_IN VARCHAR(255), NbStart_IN INTEGER, Count_IN INTEGER ) RETURNS TABLE("AuthorId" VARCHAR(36), "ArticleId" VARCHAR(36), "CategoryId" VARCHAR(36), "Autho...
DELIMITER // DROP PROCEDURE if EXISTS add_class; CREATE PROCEDURE add_class(IN name varchar(200)) BEGIN INSERT INTO product_class (name) VALUES (name); SELECT id_product_class, name FROM product_class; END // DELIMITER ;
<gh_stars>0 problem : https://www.hackerrank.com/challenges/more-than-75-marks/problem solution : SELECT NAME FROM STUDENTS WHERE MARKS > 75 ORDER BY RIGHT(NAME, 3), ID ASC;
<reponame>danilolimas-pe/pugastudios<gh_stars>0 -- INSERINDO DADOS NO BANCO DE DADOS -- TABELA tb_tipo_usuario INSERT INTO pugastudios.tb_tipo_usuario (`id_tipo_usuario`, `descricao`) VALUES (1, 'ADM'), (2, 'Usuário'); -- TABELA tb_usuario INSERT INTO pugastudios.tb_usuario (`nome`, `nickname`, `email`, `senha`, `...
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 07, 2019 at 02:37 PM -- Server version: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
--drop extension file_fdw; --create extension file_fdw; --drop server covid_source_data foreign data wrapper file_fdw; --create server covid_source_data foreign data wrapper file_fdw; -- Geografie drop foreign table if exists dev.is_mista; create foreign table dev.is_mista ( obec text, obec_kod text, okres text, ...
-- EX2 - load script 1 -- ÷икл до 60 минут или пока не будет удалена таблица ##stopload1 DROP TABLE IF EXISTS tempdb..##stopload1; GO DECLARE @start datetime2 = GETDATE(); WHILE DATEDIFF(ss,@start,GETDATE()) < 3600 AND OBJECT_ID('tempdb..##stopload1') IS NULL BEGIN SELECT TOP 10 a.name FROM master.dbo.spt_values A...
-- Funkcije COUNT(), SUM() i AVG() USE employees; -- prikazuje broj zaposlenih i prosecni datum zaposlanvanja SELECT COUNT(emp_no) AS "Broj zaposlenih", AVG(hire_date) AS "Prosecni datum zaposljavanja" FROM employees;
-- 用户 drop table if exists user; CREATE TABLE USER ( id INT NOT NULL AUTO_INCREMENT, user_account VARCHAR(32) NOT NULL, user_pwd VARCHAR(32) NOT NULL, user_name VARCHAR(64) NOT NULL, email VARCHAR(128), phone VARCHAR(32) NOT NULL, address VARCHAR(256), ...
INSERT INTO recipe_item (recipe_id, item_id) VALUES {}
<filename>database_api/migrations/2021-08-11-094641_intial_migrations/up.sql -- DROP TABLE IF EXISTS shat_database_api; CREATE TABLE IF NOT EXISTS People( id SERIAL PRIMARY KEY, username VARCHAR(255) UNIQUE ); CREATE TABLE IF NOT EXISTS Messages( id SERIAL PRIMARY KEY, message TEXT NOT NULL, issuer...
SELECT CAST("MLB_37"."year" AS SIGNED) AS "year" FROM "MLB_37" GROUP BY "MLB_37"."year", "MLB_37"."year" ORDER BY "year" ASC ;