sql
stringlengths
6
1.05M
INSERT INTO "conduit_db"."COMMENTS" VALUES ($1,$2,$3,$4,$5);
<filename>src/ddl/individual/item.sql<gh_stars>0 drop table if exists item_text; create table item_text ( i_item_sk int, i_item_id string, i_rec_start_date string, i_rec_end_date string, i_item_desc string, i_current_price ...
CREATE TABLE IF NOT EXISTS `Asignaturas` ( `Id_Asignatura` INT NOT NULL AUTO_INCREMENT, `Nombre` VARCHAR(350) NOT NULL, `Cod_Interno` VARCHAR(350) NOT NULL, `CreateAt` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, UNIQUE KEY(`Cod_Interno`), PRIMARY KEY (`Id_Asignatura`) ); INSERT INTO...
--1. Write a request to receive all products with the type "cheese". SELECT * FROM product AS p JOIN type AS t ON t.id = p.type_id WHERE t.name = 'cheese'; --2. Write a request for all products that have the word "ice cream" in their name. SELECT * FROM product WHERE name LIKE '%ice cream%'; --3. Write a query that d...
<gh_stars>0 UPDATE template SET template_file='<#include "clinicalnotefunctions"> <#-- Template start --> ${MODULE_TITLE_START} Service Injuries: ${MODULE_TITLE_END} ${MODULE_START} <#assign answerTextHash = {"var1380":"blast injury", "var1390":"injury to spine or back", "var1400":"burn (second, 3rd degree)",...
UPDATE role_module_binding SET is_check_all = 0, bind_id = 'bid-developerm1' WHERE role_id = 'developer' and module_id = 'm1'; INSERT INTO enable_action_bundle (enable_id, bind_id, action_bundle_id) VALUES ('eid-developer1', 'bid-developerm1', 'm1.f1.a1'), ('eid-developer2', 'bid-developerm1', 'm1.f1.a2'), ('eid-devel...
<reponame>sandrobonazzola/ovirt-dwh -- Changed vm_ip type to text to allow match engine and allow more then 18 ip per vm ALTER TABLE vm_samples_history ALTER COLUMN vm_ip TYPE text; ALTER TABLE vm_hourly_history ALTER COLUMN vm_ip TYPE text; ALTER TABLE vm_daily_history ALTER COLUMN vm_ip TYPE text;
<filename>sql/_04_operator_function/_03_string_op/_014_pad/cases/1013.sql --test lpad, rpad with bit type select lpad(b'0001', 10, b'01' ) from db_root; select rpad(b'0001', 10, b'01' ) from db_root order by 1;
<gh_stars>1-10 drop table if exists b; create table b (a int); insert into b values (0), (1), (2); select * from b where a > 1 or a between 1 and 0; drop table if exists b;
<reponame>Zhaojia2019/cubrid-testcases<gh_stars>1-10 autocommit off; select distinct country from hotel where cost < $180.00 and rownum between 1 and 10 order by country; select distinct country from (select country, cost from hotel order by country) as t(country, cost) where cost < $180.00 and rownum between 1 and 10;...
<filename>base_layer/wallet/migrations/2020-05-12-142154_add_direct_send_success_column_to_pending_tx/down.sql<gh_stars>100-1000 ALTER TABLE outbound_transactions DROP COLUMN cancelled; ALTER TABLE outbound_transactions DROP COLUMN cancelled;
-- @testpoint: 列名为C ,并且定义C列default值 drop table if exists tt; create table tt( c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer, c_real real, c_double real, c_decimal decimal(38), c_number number(38), c_numeric numeric(38), c_char char(50) default null, c_varchar varchar(20), c_va...
INSERT INTO education_levels (id, value) values (1, 'LICENZA ELEMENTARE'); INSERT INTO education_levels (id, value) values (2, 'LICENZA MEDIA'); INSERT INTO education_levels (id, value) values (3, 'DIPLOMA DI ISTRUZIONE SECONDARIA SUPERIORE'); INSERT INTO education_levels (id, value) values (4, 'LAUREA DI PRIMO LIVELLO...
<reponame>tvqphuoc01/HQT_CSDL_DO_AN_THUC_HANH<gh_stars>0 USE [QL_DH_GH_ONLINE] GO EXEC DT_CAPNHATSL_FIX 'SP001', 50
CREATE PROCEDURE [dbo].[spUserLookup] @Id nvarchar(128) AS BEGIN SET NOCOUNT ON; SELECT * FROM [dbo].[User] WHERE Id=@Id; END
<reponame>taruk029/apnalawyer /* SQLyog Ultimate v10.42 MySQL - 5.5.5-10.4.11-MariaDB : Database - apnalawyer ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 *...
CREATE TABLE [dbo].[EventCalendarCategories] ( [CategoryId] INT NOT NULL, [Name] NVARCHAR (250) NOT NULL, [TemplateId] INT CONSTRAINT [DF_LocalCalendarCategories_TemplateId] DEFAULT ((-1)) NOT NULL, CONSTRAINT [PK_EventCalendarCategories] PRIMARY KEY CLUSTERED ([CategoryId] ...
ALTER TABLE public.billing_accounts ADD COLUMN charge integer; ALTER TABLE public.billing_accounts ADD COLUMN is_annual boolean; ALTER TABLE public.billing_plans ADD COLUMN stripe_id character varying; CREATE TABLE public.stripe_products ( id bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVA...
<gh_stars>1-10 SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; create schema minion_upms collate utf8mb4_unicode_ci; use minion_upms; -- ---------------------------- -- Table structure for sys_menu -- ---------------------------- DROP TABLE IF EXISTS `sys_menu`; CREATE TABLE `sys_menu` ( `id` bigint(20) unsigned NO...
/********************************************************************************/ /*@file cohort_final.sql /* /*in: AKI_stages_daily, AKI_Initial /* /*out: AKI_onsets /* /*action: write /********************************************************************************/ create table AKI_onsets as with pat_enc as ( selec...
<reponame>paulissoft/oracle-build-tools prompt --application/shared_components/user_interface/themes begin -- Manifest -- THEME: 138 -- Manifest End wwv_flow_api.component_begin ( p_version_yyyy_mm_dd=>'2020.10.01' ,p_release=>'20.2.0.00.20' ,p_default_workspace_id=>2601326064169245 ,p_default_application_id=>...
<gh_stars>10-100 -- file:domain.sql ln:32 expect:true SELECT cast('12345' as domainvarchar)
select DateDiff(MI,StartDate,EndDate) AS Timetaken,* FROM table1 SELECT * FROM table2 WHERE id = 1 GO /* Test1 */ /* Multiline test 1 2 */ /* Test2 */ SELECT * FROM table3 where ID = 7 GO /* Test3 */ SELECT * FROM table4 where ID = 8
<filename>sql/schema/TABLE.attendees_sources.ACL.sql -- Name: TABLE attendees_sources; Type: ACL; Schema: public; Owner: - -- GRANT ALL ON TABLE public.attendees_sources TO client; --
DROP TABLE IF EXISTS `contact_type`; CREATE TABLE `contact_type` ( id INT AUTO_INCREMENT, value VARCHAR(20) NOT NULL UNIQUE, PRIMARY KEY (id) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; INSERT INTO `contact_type` (`value`) VALUES ('name'), ('surname'), ('role'); DROP TABLE IF EXISTS `user`...
set enable_planner_v2 = 1; CREATE ROLE 'test-a'; CREATE ROLE 'test-a'; -- {ErrorCode 2202} CREATE ROLE IF NOT EXISTS 'test-a'; DROP ROLE 'test-a'; set enable_planner_v2 = 0;
{%- macro quote_insensitive(identifier) -%} {# Correctly quotes identifers to match the native folding for the target data warehouse. Per the SQL spec this _should_ be to uppercase, but this is not always the standard. ARGS: - identifier (string) the column / database / relation name to be f...
-- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> -- ============================================= CREATE PROCEDURE [dbo].[usp_read_all_organization_tallys] AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets ...
-- db_patches INSERT INTO `db_patches` (`issue`, `created`) VALUES('POCOR-2734', NOW()); -- security_group_users -- Re-run patch from POCOR-3003 UPDATE security_group_users JOIN institution_staff s ON s.security_group_user_id = security_group_users.id JOIN institution_positions p ON p.id = s.institution_position_id JO...
select name, route_table_id from alicloud_vpc_route_entry where route_table_id = 'dummy-{{ output.route_table_id.value }}';
<reponame>flalemar/MOSL- /* Memory Optimised Scripts Library for SQL Server 2014: Shows details for the Checkpoint Pair Files Version: 0.2.0, November 2016 Copyright 2015-2016 <NAME>, OH22 IS (http://www.nikoport.com/), (http://www.oh22.is/) Licensed under the Apache License, Version 2.0 (the "License"); you m...
<reponame>My-Colaborations/ada-awa<filename>awa/db/migrate/awa-2.0-migrate.sql /* Migrate from AWA 2.0 to AWA 2.1 */ ALTER TABLE awa_post CHANGE `summary` `summary` VARCHAR(4096) BINARY NOT NULL;
create table t1(a int, b float, c bigint, d numeric); go create index i1_t1 on t1 (a, b); go select indid, name from sys.sysindexes where id=OBJECT_ID('t1'); go -- clean up drop index i1_t1 on t1 go drop table t1 go
<gh_stars>0 --top 10 hottest places, on average WITH top_average AS (select distinct wf.station_nbr, wf.wban_nbr , avg(mean_temperature_f) as average_temp, max(mean_temperature_f) as max_temp from weather_fact wf where wf.mean_temperature_f ...
<reponame>loujine/musicbrainz-server \set ON_ERROR_STOP 1 BEGIN; ALTER TABLE editor_collection_type -- Already dropped in slave update script ADD CONSTRAINT allowed_collection_entity_type CHECK ( entity_type IN ('area', 'artist', 'event', 'instrument', 'label', 'place', 'recording', 'release', 'release...
<gh_stars>1-10 --Create serial without minvalue and retrieve from db_serial(The min_val) create serial test_serial start with 10000001 increment by 2; create class test_class(col integer); insert into test_class values(test_serial.next_value); insert into test_class values(test_serial.next_value); insert into test_cla...
<filename>scheema.sql DROP DATABASE IF EXISTS employeeDB; CREATE DATABASE employeeDB; USE employeeDB; CREATE TABLE departments ( id INT NOT NULL AUTO_INCREMENT, dep_name VARCHAR(45) NULL, PRIMARY KEY (id) ); CREATE TABLE roles ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(45) NULL, salary DECIMAL(10...
<reponame>sivaprakashniet/laravel<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 19, 2014 at 01:44 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_CH...
-- 关系数据库是建立在关系模型上的 -- 关系模型本质上是若干个存储数据的二维表 -- 表的每一行称为记录(Record),记录是一个逻辑意义上的数据 -- 表的每一列称为字段(Column),同一个表的每一行记录都拥有相同的若干字段 -- 字段定义了数据类型(整数、浮点型、字符串、日期),以及是否允许为 NULL -- NULL表示字段数据不存在 -- 一个整型字段如果为 NULL不表示它的值为 0 -- 一个字符串型字段为 NULL不表示它的值为 空字符串'' -- 通常情况下,字段应避免允许为 NULL,不允许为 NULL可以简化查询条件,加快查询速度,也利于应用程序读取数据后无需判断是否为 NULL -- 关系数据...
CREATE TABLE "0010_model" ( id serial NOT NULL PRIMARY KEY, title varchar(100) ); -- DOWN INSERT INTO "0010_model" (title) VALUES ('DROP 0010_model');
<filename>darth-vader/05_full_stack_sinatra/d01/Tim_Rourke/afterhours/migrations_facebook.sql<gh_stars>0 CREATE DATABASE facebook; \c facebook; CREATE TABLE post ( id SERIAL PRIMARY KEY, user_id integer, title varchar(255), content text, created_date timestamp, updated_date timestamp ); CREATE TABLE likes ( i...
SELECT b1.name, count(*) FROM site AS s, so_user AS u1, tag AS t1, tag_question AS tq1, question AS q1, badge AS b1, account AS acc WHERE s.site_id = u1.site_id AND s.site_id = b1.site_id AND s.site_id = t1.site_id AND s.site_id = tq1.site_id AND s.site_id = q1.site_id AND...
<gh_stars>0 -- *************************************************************************** -- File: 9_2b.sql -- -- Developed By TUSC -- -- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant -- that this source code is error-free. If any errors are -- found in this source code,...
/*--------------------------------------------------------------------- Exercise 550 Table: Activity +--------------+---------+ | Column Name | Type | +--------------+---------+ | player_id | int | | device_id | int | | event_date | date | | games_played | int | +--------------+---------+ ...
<reponame>clei1719/Software-Development<gh_stars>0 -- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET default_tablespace = ''; SET default_wi...
<reponame>Revature-1704-Java/trms-nullpointerxception<filename>TRMS.sql -------------------------------------------------------- -- File created - Thursday-January-04-2018 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Type ROLEARRAY ---...
<gh_stars>0 CREATE TABLE IF NOT EXISTS quizzes ( id INTEGER PRIMARY KEY NOT NULL, name TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS questions ( id INTEGER PRIMARY KEY NOT NULL, quiz_id INTEGER NOT NULL, text TEXT NOT NULL, type VARCHAR NOT NULL, FOREIGN KEY(quiz_id) REFERENCES quiz(id) ); CREATE TABLE IF NOT E...
CREATE PROCEDURE usp_AssignProject(@employeeId INT, @projectID INT) AS BEGIN BEGIN TRAN INSERT INTO EmployeesProjects VALUES (@employeeId, @projectID) IF (SELECT COUNT(ProjectID) FROM EmployeesProjects WHERE EmployeeID = @employeeId) > 3 BEGIN RAISERROR ('The employee ...
<gh_stars>0 USE "Ads"; SELECT MIN(Date) AS "MinDate", MAX(Date) AS "MaxDate" FROM "Ads"; /* MinDate MaxDate 2014-12-23 19:04:27.000 2015-02-19 17:36:00.000 */
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'code_camp_demo') CREATE DATABASE code_camp_demo
<filename>pogo-map-api/resources/sql/V1.4.sql alter table raid add players json;
-- phpMyAdmin SQL Dump -- version 4.6.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Oct 24, 2019 at 02:00 AM -- Server version: 5.7.13-log -- PHP Version: 5.6.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SPC_COMMON_ACCOUNT]') AND type IN (N'P', N'PC')) /****** Object: StoredProcedure [dbo].[SPC_M001L_FND1] Script Date: 2017/11/23 16:46:46 ******/ DROP PROCEDURE [dbo].[SPC_COMMON_ACCOUNT] GO /****** Object: StoredProcedure [dbo].[SPC_M...
<gh_stars>10-100 Select trans_nav.Externe_BelegNr ,trans_uster.AuftragsNr --,DHL_Kunde.Sendungsnummer --,tf.[ArtikelNr] --,case -- when tf.[ArtikelNr] in ( -- Select -- distinct [EAN] collate Latin1_General_CI_AS as ArtikelNr -- FROM [BI_Data].[dbo].[OPS_Fiege_Morphologie] -- w...
<reponame>aliostad/deep-learning-lang-detection SET STATISTICS IO ON SELECT U.DisplayName, Title, MostRecentPost.CreationDate FROM Users U JOIN ( SELECT Id, OwnerUserId, Title, CreationDate FROM Posts P WHERE P.Id IN (SELECT MAX(Id) FROM Posts GROUP BY OwnerUserId) ) AS MostRecentPost ON U.Id = MostRecentPost.Own...
<gh_stars>100-1000 -- vtab2.test -- -- execsql { -- SELECT *, b.rowid -- FROM schema a LEFT JOIN schema b ON a.dflt_value=b.dflt_value -- WHERE a.rowid=1 -- } SELECT *, b.rowid FROM schema a LEFT JOIN schema b ON a.dflt_value=b.dflt_value WHERE a.rowid=1
<gh_stars>100-1000 CREATE TABLE [dbo].[PurchaseInvoiceLine] ( [Id] [int] NOT NULL IDENTITY (1,1), [PurchaseInvoiceHeaderId] [int] NOT NULL, [ItemId] [int] NOT NULL, [MeasurementId] [int] NOT NULL, [InventoryControlJournalId] [int] NULL, [Quantity] [decimal](18,2) NOT NULL, [ReceivedQuantity] ...
@@ rss-generation-create.sql @@ rss-generation-sc-create.sql
<filename>sql/add_test_data.sql -- Lisää INSERT INTO lauseet tähän tiedostoon INSERT INTO Kayttaja (tunnus, salasana) VALUES ('Taneli','salasana'); INSERT INTO Tehtava (nimi, lisayspaiva, tarkeysaste, deadline, kuvaus, kayttaja_id) VALUES ('<NAME>', NOW(), 3, '2013-03-30', 'Pese kaikki pyykit! -Valkopyykit, lakanat, py...
DROP TABLE IF EXISTS USER_ROLES; DROP TABLE IF EXISTS USER_ACCOUNT; DROP TABLE IF EXISTS ROLES_FEATURES; DROP TABLE IF EXISTS USERS; DROP TABLE IF EXISTS ROLES; DROP TABLE IF EXISTS FEATURES; DROP TABLE IF EXISTS ACCOUNTS; DROP TABLE IF EXISTS REPORTS; CREATE TABLE USERS ( ID INT AUTO_INCREMENT ...
CREATE OR REPLACE FUNCTION vocabulary_download.get_icd10pcs( iOperation text default null, out session_id int4, out last_status INT, out result_output text ) AS $BODY$ DECLARE pVocabularyID constant text:='ICD10PCS'; pVocabulary_auth vocabulary_access.vocabulary_auth%type; pVocabulary_url vocabulary_access.vocabulary_u...
SELECT COUNT(1) FROM public.especialista WHERE documento_identificacion = :documentoIdentificacion
-- MySQL dump 10.13 Distrib 5.6.28, for debian-linux-gnu (x86_64) -- -- Host: 192.168.127.12 Database: magento -- ------------------------------------------------------ -- Server version 5.6.28-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULT...
CREATE TABLE "TAG" ( "TAG_ID" NUMBER NOT NULL ENABLE, "MEDIA_ID" NUMBER NOT NULL ENABLE, "REMARK" VARCHAR2(4000 CHAR), "REFTOP" NUMBER, "REFLEFT" NUMBER, "REFH" NUMBER, "REFW" NUMBER, "IMGH" NUMBER, "IMGW" NUMBER, "COLLECTION_OBJECT_ID" NUMBER, "COLLECTING_EVENT_ID" NUMBER, "LOCALITY_ID" NU...
select sum(lo_revenue), d_year, p_brand1 from denormalized where p_brand1 = 'MFGR#2221' and s_region = 'EUROPE' group by d_year, p_brand1 order by d_year, p_brand1;
{{ config(materialized='incremental') }} select 1 as id {% if is_incremental() %} this is a syntax error! {% endif %}
/*L Copyright SAIC Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cabio/LICENSE.txt for details. L*/ create unique index SYS_C0016511_idx on PID_PHYSICAL_ENTITY_ACCESSION (ENTITY_ACCESSION_ID,PHYSICAL_ENTITY_ID) tablespace CABIO_FUT; alter table PID_PHYSICAL_ENTI...
<reponame>CBIIT/rembrandt /*L Copyright (c) 2006 SAIC, SAIC-F. Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/rembrandt/LICENSE.txt for details. L*/ -- Replace the <<database_name>> with proper database name that is to be migrated. -- USE <<database_name>>; CREATE TABLE C...
-- @testpoint:开启事务移动游标位置,参数为forward,默认从当前关联位置开始,将游标移动到下一行; --前置条件 drop table if exists cur_test_156; create table cur_test_156(c_id int,c_num int,c_name varchar(10),c_city varchar(10),c_add varchar(20)); insert into cur_test_156 values(1,18,'Allen','Beijing','AAAAABAAAAA'),(2,368,'Bob','Shanghai','AAAAACAAAAA'), ...
<filename>Odev12.sql<gh_stars>0 -- 1.film tablosunda film uzunluğu length sütununda gösterilmektedir. Uzunluğu ortalama film uzunluğundan fazla kaç tane film vardır? SELECT COUNT(*) FROM film WHERE length > (SELECT AVG(length) FROM film); -- 2.film tablosunda en yüksek rental_rate değerine sahip kaç tane film vardır...
<filename>dbmain.sql -- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 18, 2013 at 10:02 AM -- Server version: 5.1.53 -- PHP Version: 5.3.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101...
declare p_Mensagem_Retorno VARCHAR2(1000); v_txtSQL VARCHAR2(1000); BEGIN dbms_output.enable(null); FOR cur_tab IN ( SELECT owner, table_name FROM dba_tables WHERE owner = UPPER('&SCHEMA_NAME') ...
<reponame>yudi1105/sistemduwek<filename>sidsaripraja.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 25, 2019 at 05:16 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT =...
\connect eventmanager; begin transaction; INSERT INTO Users ( username, password, first_name, last_name ) VALUES ( '<EMAIL>', crypt('123456', gen_salt('bf', 11)), 'Admin', 'User' ); INSERT INTO migrations(name) VALUES ('v006___admin_user.sql'); end transaction;
SET @NUMBER = 21; SELECT REPEAT("* ", @NUMBER := @NUMBER - 1) FROM INFORMATION_SCHEMA.TABLES
-- phpMyAdmin SQL Dump -- version 4.2.12deb2+deb8u3 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 09, 2019 at 09:33 PM -- Server version: 5.5.62-0+deb8u1 -- PHP Version: 5.6.39-0+deb8u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<filename>solutions/full-score.sql<gh_stars>0 /* Enter your query here. */ SELECT HACKERS.HACKER_ID, HACKERS.NAME FROM HACKERS JOIN ( SELECT SUBMISSIONS.HACKER_ID, COUNT(DISTINCT SUBMISSIONS.CHALLENGE_ID) AS FREQUENCY FROM SUBMISSIONS JOIN CHALLENGES ON CHALLENGES.CHALLENGE_ID = SUBMISSIONS.CHALLENGE_ID ...
<gh_stars>0 SELECT PROTEIN.protein_id AS protein_id, PROTEIN.protein_names AS protein_names, PROTEIN.ac AS ac, PROTEIN.status AS status, PROTEIN.sequence AS sequence, PROTEIN.seq_length AS seq_length, PROTEIN.fragment AS fragment, PROTEIN.function AS function, PROTEIN.tissue_specificity AS ti...
ALTER TABLE ideablink.main ADD COLUMN favorite int default 0;
ALTER TABLE [dbo].[RestrictedPageNames] ADD CONSTRAINT [FK_RestrictedPageNames_Languages] FOREIGN KEY([LanguageKey]) REFERENCES [dbo].[Languages] ([Id]) ON DELETE CASCADE GO ALTER TABLE [dbo].[RestrictedPageNames] CHECK CONSTRAINT [FK_RestrictedPageNames_Languages] GO
CREATE OR REPLACE FUNCTION openclinica_fdw.dm_create_dm_user_account_roles() RETURNS VOID AS $BODY$ BEGIN EXECUTE $query$ CREATE MATERIALIZED VIEW dm.user_account_roles AS SELECT ua.user_id, ua.user_name, ua.first_name, ua.last_name, ...
package test_fixtures CREATE TABLE language ( id INT NOT NULL PRIMARY KEY, cd CHAR(2) NOT NULL, description VARCHAR(50) ); CREATE TABLE author ( id INT NOT NULL PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50) NOT N...
-- AlterTable ALTER TABLE "Diary" ADD COLUMN "diary_date" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
INSERT INTO PROFILE_CODES (PROFILE_TYPE, PROFILE_CODE, DESCRIPTION, LIST_SEQ, UPDATE_ALLOWED_FLAG, ACTIVE_FLAG, USER_ID, MODIFIED_DATE) VALUES ('NAT', 'GABO', 'Gabonese', 99, 'Y', 'Y', 'OMS_OWNER', sysdate); INSERT INTO PROFILE_CODES (PROFILE_TYPE, PROFILE_CODE, DESCRIPTION, LIST_SEQ, UPDATE_ALLOWED_FLAG, ACTIVE_FLAG, ...
<reponame>dmerrick/danalol-stream<gh_stars>1-10 ALTER TABLE videos DROP CONSTRAINT "videos_slug_key";
<filename>datapack/sql/character_skills_save.sql -- --------------------------- -- Table structure for character_skills -- --------------------------- CREATE TABLE IF NOT EXISTS character_skills_save ( char_obj_id INT NOT NULL default 0, skill_id INT NOT NULL default 0, skill_level INT NOT NULL default 0, effec...
<gh_stars>0 USE master; SELECT percent_complete, estimated_completion_time FROM sys.dm_exec_requests WHERE percent_complete > 0;
<reponame>agentmedia/phine-core ALTER TABLE `pc_core_settings` ADD `ChangeRequestLifetime` INT UNSIGNED NOT NULL AFTER `LogLifetime`; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `pc_core_member_change_request` -- CREATE TABLE IF NOT EXISTS `pc_core_member_change_req...
<reponame>southpolemonkey/listof<gh_stars>10-100 /*Connect to database*/ \connect listof /*Create metadata table of lists*/ CREATE TABLE base.sys_list ( id SERIAL PRIMARY KEY , "name" CITEXT NOT NULL UNIQUE , "description" CITEXT NOT NULL , table_name TEXT UNIQUE , created_date TIMESTAMP DEFAU...
-- -- PostgreSQL database dump -- -- Dumped from database version 12.5 -- Dumped by pg_dump version 12.5 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'SJIS'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_pa...
select `n_name`, `r_name` from `nation` left join `region` on `n_nationkey` = `r_regionkey` where `r_name` > 'g'
 /*==============================================================*/ /* Table: NoPkTable */ /*==============================================================*/ create table NoPkTable ( Id int identity, ) /*==========================...
<reponame>YordanGeorgiev/qto -- DROP TABLE IF EXISTS quinquennially_issues ; SELECT 'create the "quinquennially_issues" table' ; CREATE TABLE quinquennially_issues ( guid UUID NOT NULL DEFAULT gen_random_uuid() , id bigint UNIQUE NOT NULL DEFAULT cast (to_char(current_timestamp, 'Y...
/* *============================================================================ Name : sqlserver_createDB.sql System : FME Server Language : SQL Purpose : Create the FME Server database schema. Author Date Changes made ------------------ ------------ --------...
<reponame>alifaizan786-op/Employee_Management_System SELECT employee.first_name, employee.last_name, emp_role.title, emp_role.salary, department.depname, CONCAT(e.first_name, ' ' ,e.last_name) AS Manager FROM employee INNER JOIN role on role.id = employee.role_id INNER JOIN department on department.id = role.d...
insert into EMPLOYEE VALUES(102,21,'programmer','Abhi'); insert into EMPLOYEE VALUES(103,22,'IAS','Aaa'); insert into EMPLOYEE VALUES(104,23,'developer','Anvesh');
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 09, 2017 at 06:19 AM -- Server version: 10.1.19-MariaDB -- PHP Version: 7.0.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
<filename>chat_api/SP_GET_MESSAGES.sql<gh_stars>0 CREATE PROCEDURE SP_GET_MESSAGES ( @UserId INT ) AS CREATE TABLE #TEMP ( [MessageId] BIGINT, [UserSentId] INT, [ConversationId] VARCHAR(36), [Text] VARCHAR(500), [Pending] BIT, [SendDate] DATETIME ) CREATE TABLE #TEMP_ID_MESSAGES ( [MessageId] INT ) ...
CREATE TABLE [Production].[Culture] ( [CultureID] NCHAR (6) NOT NULL, [Name] [dbo].[Name] NOT NULL, [ModifiedDate] DATETIME CONSTRAINT [DF_Culture_ModifiedDate] DEFAULT (getdate()) NOT NULL, CONSTRAINT [PK_Culture_CultureID] PRIMARY KEY CLUSTERED ([CultureID] ASC) ); GO CREATE UNIQU...
CREATE OR REPLACE PROCEDURE ADD_PINTURA( PINTURAID PINTURA.COD_PINTURA%TYPE, TINTA_PINTURA PINTURA.TIPO_TINTA%TYPE, SUP_PINTURA PINTURA.SUPORTE%TYPE, EST_PINTURA PINTURA.ESTILO%TYPE ) IS BEGIN INSERT INTO PINTURA VALUES(PINTURAID,TINTA_PINTURA,SUP_PINTURA,EST_PINTURA); END; / EXEC ADD_PINTURA(1,'ÓL...