sql stringlengths 6 1.05M |
|---|
<reponame>LYZhelloworld/Leetcode
# Write your MySQL query statement below
select d.Name as Department, e.name as Employee, e.Salary
from Employee e
inner join Department d on e.DepartmentId = d.Id
inner join (
select max(ee.Salary) as maxSalary, ee.DepartmentId
from Employee ee
group by ee.DepartmentId
) m ... |
<reponame>david-apk/metronome_multiplayer
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
name_login TEXT NOT NULL,
password_login TEXT NOT NULL,
last_address TEXT NOT NULL
);
DROP TABLE IF EXISTS rooms;
... |
-- <NAME>
-- 1. List the book(s) which has the highest rating. Show book id, book name, and the rating.
SELECT TOP 1 B.Book_ID, U.Book_Title, AVG(MF.Rating) AS Rating
FROM BOOK B
INNER JOIN [MEMBER FEEDBACK] MF
ON B.Book_ID = MF.Book_ID
INNER JOIN UNIVERSAL_BOOK U
ON B.Book_ISBN = U.Book_ISBN
GROUP BY B.Book_ID, U.Book... |
<gh_stars>1-10
DROP TABLE IF EXISTS similar_words;
CREATE TABLE `similar_words` (
`word1` varchar(64) NOT NULL,
`word2` varchar(64) NOT NULL,
`score` int(10) unsigned NOT NULL,
`time_id` int(10) unsigned NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS time_slices;
CREATE TABLE time_s... |
<filename>Store Procedures/ums_Delete_user.sql
-- =============================================
-- Author: <NAME>
-- Create date: 2020-08-31
-- Description: User deactivation.
-- =============================================
CREATE PROCEDURE ums_Delete_user
@param_Id nvarchar(max)
AS
BEGIN
UPDATE [dbo].[Account] SET... |
CREATE TABLE `PROC_DTL_SUB` (
`ITEM_ID` VARCHAR(20) NOT NULL COMMENT '자재 ID', -- ITEM_ID
`SRC_CD` VARCHAR(20) NOT NULL COMMENT '재료코드', -- SRC_CD
`SEQ_NO` DECIMAL(10) NOT NULL COMMENT '작업순서', -- SEQ_NO
`SEQ_NM` VARCHAR(20) NULL COMMENT '순서이름', -- SEQ_NM
`PROC_TIME` DECIMAL(5) NULL COMMENT '소요시간', -- ... |
-- file:float4.sql ln:49 expect:true
SELECT '' AS one, f.* FROM FLOAT4_TBL f WHERE f.f1 = '1004.3'
|
<reponame>DzonnyDZ/Caps
ALTER TABLE [dbo].[Cap_Category_Int]
ADD CONSTRAINT [FK_Cap_Category_Int_Cap] FOREIGN KEY ([CapID]) REFERENCES [dbo].[Cap] ([CapID]) ON DELETE CASCADE ON UPDATE NO ACTION;
|
<reponame>rickygzz/autoupgrade<filename>upgrade/sql/1.7.7.6.sql<gh_stars>10-100
SET SESSION sql_mode='';
SET NAMES 'utf8';
ALTER TABLE `PREFIX_currency` MODIFY COLUMN `numeric_iso_code` varchar(3) DEFAULT NULL NULL;
|
update newtable set nextcol = 'new job';
update newtable set nextcol = 'well done', last_col = 'also well done' where the_job_id = 100;
create table if not exists managers (
internal_id int not null auto_increment primary key,
functionality varchar(45) default 'uknown',
manager_id int not null
);
insert into man... |
CREATE TABLE [Portfolio].[ProjectTypeMapping] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[ProjectID] INT NOT NULL,
[ProjectTypeID] INT NOT NULL,
PRIMARY KEY CLUSTERED ([ID] ASC),
CONSTRAINT [ProjectTypeMapping_ProjectID_Project_ID] FOREIGN KEY ([ProjectID]) REFERENCES [Portfolio].[Project]... |
<filename>sequence_usage_check.sql<gh_stars>0
set pagesize 0 linesize 200 echo off feedback off verify off
prompt
prompt ##############Begin#############################################
prompt Parameter:Sequence usage check
prompt *****************Begin*********
prompt
select SEQUENCE_OWNER || '||' ||
SEQUENC... |
<reponame>photogamerun/weiwodb
-- database: presto; groups: tpch; tables: partsupp,supplier,nation
SELECT
ps_partkey,
sum(ps_supplycost * ps_availqty) AS value
FROM
partsupp,
supplier,
nation
WHERE
ps_suppkey = s_suppkey
AND s_nationkey = n_nationkey
AND n_name = 'GERMANY'
GROUP BY
ps_par... |
<reponame>jzonthemtn/berlin-buzzwords-2021<filename>data-scripts/judgments.sql
CREATE DATABASE IF NOT EXISTS `judgments`;
USE `judgments`;
DROP TABLE IF EXISTS `judgments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `judgments` (
`docu... |
<reponame>bcgov/cas-cif
-- Revert cif:tables/project from pg
begin;
drop table cif.project;
commit;
|
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
-- Table: article
DROP TABLE IF EXISTS article;
CREATE TABLE article (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title STRING,
shortText STRING,
fullText TEXT,
socialNetworksText STRING
);
-- Table: static_page
DROP TABLE IF EXISTS static_page;
CREATE TABLE static_p... |
/* Here, no database upgrade is porvided, we assume 1.0.0.0 version was never installed in a production environment */
/* Relies on geocoded_locations table Cf. phpfacile/geocoding-db-zend */
CREATE TABLE IF NOT EXISTS metadata (
keyword VARCHAR(64) NOT NULL,
value VARCHAR(64),
UNIQUE(keyword)
);
CREATE TAB... |
<gh_stars>0
/*
SQLyog Community v12.09 (64 bit)
MySQL - 10.1.13-MariaDB : Database - horses
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @O... |
<reponame>Edufacr/University-DB1-Project
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date: 2020/6/1
-- Description: Query all active properties-owners relations.
-- =============================================
-- TODO Input validations... |
<reponame>vanesa19805/theemployee-tracker<filename>config/db/schemas.sql<gh_stars>0
DROP DATABASE IF EXISTS work_db;
CREATE DATABASE work_db;
USE work_db;
CREATE TABLE department(
id INTEGER PRIMARY KEY,
names VARCHAR(30)
);
CREATE TABLE role(
id INTEGER PRIMARY KEY,
title VARCHAR(30),
salary DECIMAL,
depart... |
<gh_stars>0
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600127',@CutoffDate = N'2017-09-30',@EPS = N'0.0141',@EPSDeduct = N'0',@Revenue = N'19.98亿',@RevenueYoy = N'32.82',@RevenueQoq = N'-4.36',@Profit = N'904.69万',@ProfitYoy = N'-33.51',@ProfiltQoq = N'-26.26',@NAVPerUnit = N'1.1730',@ROE = N'1.21',@CashPerUnit = N'0.1888',@... |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 01, 2020 at 03:11 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>benetech/ImageShare
CREATE TABLE IF NOT EXISTS %group_resource_file_join_table_name% (
`group_post_id` bigint(20) UNSIGNED NOT NULL,
`resource_file_post_id` bigint(20) UNSIGNED NOT NULL,
PRIMARY KEY (`group_post_id`, `resource_file_post_id`)
) %charset_collate%;
|
<reponame>victorluissantos/mysql-12036
-- 1 Lista de todos os servicos femininos
SELECT
*
FROM
servicos
WHERE
upper(nome) like upper('%feminino%')
-- 2 lista de todos os clientes com sobre nome santos
SELECT
*
FROM
clientes
WHERE
upper(nome) like upper('%santos')
-- 3 lista de todos os clientes com emails/domin... |
CREATE TABLE `video` (
`video_id` VARCHAR(255) UNIQUE NOT NULL,
`description` VARCHAR(4096) DEFAULT NULL,
`duration` TINYBLOB,
`publish_date` DATE NOT NULL,
`thumbnail_link` VARCHAR(255) DEFAULT NULL,
`title` VARCHAR(255) DEFAULT NULL,
PRIMARY KEY (`vid... |
<reponame>jichang/sso<filename>backend/migrations/2017-03-01-084638_create_table_contacts/up.sql
-- Table: sso.contacts
CREATE TABLE IF NOT EXISTS sso.contacts
(
id bigserial NOT NULL,
user_id bigint NOT NULL,
type_id integer NOT NULL,
identity character varying(2048) NOT NULL,
created_time timestamp with ti... |
-- Revert seattleflu/schema:warehouse/kit from pg
begin;
drop table warehouse.kit;
commit;
|
CREATE TABLE IF NOT EXISTS `gamessm_servers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ip` text NOT NULL,
`game` text NOT NULL,
`vip` text NOT NULL,
`date` text NOT NULL,
`addedby` text NOT NULL,
`website` text NOT NULL,
`startvip` text,
`expirevip` text,
PRIMARY KEY (... |
# zdobnovSynt.sql was originally generated by the autoSql program, which also
# generated zdobnovSynt.c and zdobnovSynt.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#Gene homology-based synteny blocks from <NAME>/<NAME> et al.
CREATE ... |
/*
Find Median Given Frequency Of Numbers Problem
Description
LeetCode Problem 571.
The Numbers table keeps the value of number and its frequency.
+----------+-------------+
| Number | Frequency |
+----------+-------------|
| 0 | 7 |
| 1 | 1 |
| 2 | 3 |
| 3 ... |
-- VM_MIGRATION_FAILED_FROM_TO was not in use
update event_map set event_up_name = 'VM_MIGRATION_TO_SERVER_FAILED' where event_up_name='VM_MIGRATION_FAILED_FROM_TO';
|
DROP TABLE account_balance;
DROP TABLE account_balance_merge_mv;
DROP TABLE account_last_balance_view; |
-- Revert comments
BEGIN;
DROP TABLE IF EXISTS comments;
COMMIT;
|
ALTER TABLE {$NAMESPACE}_harbormaster.harbormaster_build
ADD buildParameters LONGTEXT COLLATE {$COLLATE_TEXT} NOT NULL;
UPDATE {$NAMESPACE}_harbormaster.harbormaster_build
SET buildParameters = '{}' WHERE buildParameters = '';
|
create index idx_ahbot_history_item on ahbot_history(item);
create index idx_ahbot_history_won on ahbot_history(won);
create index idx_ahbot_history_auction_house on ahbot_history(auction_house);
create index idx_ahbot_history_category on ahbot_history(category);
create index idx_ahbot_history_buytime on ahbot_history(... |
<filename>medium/_02_xtests/cases/union_derived.sql<gh_stars>1-10
autocommit off;
create class aa (a numeric);
create class bbb (b numeric);
insert into aa values(1);
insert into bbb values(1);
select a , 0 a1 from aa union select 0 aa, b from bbb ;
select * from (select a , 0 a1 from aa union select 0 aa, b from bbb... |
USE Gringotts
SELECT MAX(MagicWandSize)
AS LongestMagicWand
FROM WizzardDeposits |
SELECT file_versions.id,
file_versions.file_title AS title,
file_versions.created_at,
users.email_address
FROM file_versions JOIN users ON file_versions.created_by = users.id
WHERE file_versions.file = $1
ORDER BY file_versions.version_number desc
|
<gh_stars>0
CREATE FUNCTION dbo.ufn_EnvironmentId
(
@EnvironmentName nvarchar(32)
)
RETURNS uniqueidentifier
as
BEGIN
DECLARE @EnvironmentId uniqueidentifier
SELECT @EnvironmentId = a.Id
FROM ref.tbl_Environment as a with (nolock)
WHERE a.Name = @EnvironmentName
RETURN @EnvironmentId
END
GO |
## substring...................................................
SELECT SUBSTR('HELLO WORLD',6,11); ## SUBSTR(string, start, end)
SELECT SUBSTR('HELLO WORLD',1,5) AS Substr;
USE shop;
SELECT SUBSTR(first_name,1,3) FROM employees;
## concate string...............................................
SELECT CONCAT('Alex... |
<reponame>andresdecarvalho/Nextcid
CREATE DATABASE IF NOT EXISTS Nextcid;
USE Nextcid;
CREATE TABLE IF NOT EXISTS Curso(
idCurso INT NOT NULL,
nmCurso VARCHAR (50) NOT NULL,
PRIMARY KEY(idCurso)
);
CREATE TABLE IF NOT EXISTS Disciplina(
iddisciplina INT NOT NULL,
nmDisciplina VARCHAR (50) NOT NULL,
idCurso... |
BEGIN;
CREATE OR REPLACE VIEW "liquid_feedback_version" AS
SELECT * FROM (VALUES ('1.2.8', 1, 2, 8))
AS "subquery"("string", "major", "minor", "revision");
ALTER TABLE "delegation" DROP CONSTRAINT "delegation_area_id_key";
ALTER TABLE "delegation" DROP CONSTRAINT "delegation_issue_id_key";
DROP INDEX "delegation... |
<reponame>yerlandinata/word-relation-gamification-backend
UPDATE public.gold_standard SET wrt_id=3 WHERE wp_id=3016;
INSERT INTO public.gold_standard (wp_id, wrt_id) VALUES (1796, 2);
UPDATE public.player SET score=0;
INSERT INTO public.player (id, full_name, birth_date, education_level, score, annotation_count, elapse... |
<gh_stars>10-100
DELETE
FROM test
WHERE 1=1
AND foo = ?
ORDER BY
bar DESC
LIMIT 1
|
-- Calculate hospital mortality, 30 day mortality (from hospital admission), 1 year mortality (from hospital admission)
-- Inclusion criteria: Adult (>15 year old) patients, *MOST RECENT* hospital admission
with tmp as(
select adm.hadm_id, admittime, dischtime, adm.deathtime, pat.dod
-- integer which is 1 for the most... |
CREATE SCHEMA [PocketMigrator]
AUTHORIZATION [dbo];
|
INSERT INTO `pets` (`petID`, `petName`, `price`, `age`, `sex`, `status`, `category`, `product`)
VALUES (10000, 'Coco', 10002.30, 1, '公', 0, 'DOGS', '柯基');
INSERT INTO `pets` (`petID`, `petName`, `price`, `age`, `sex`, `status`, `category`, `product`)
VALUES (10001, 'Bobo', 1230.66, 2, '母', 1, 'DOGS', '柴犬');
INSERT INTO... |
-- file:triggers.sql ln:1361 expect:true
create trigger trig_del_after after delete on parted2_stmt_trig
for each statement execute procedure trigger_notice()
|
CREATE OR REPLACE PACKAGE BODY dz_swagger3_loader
AS
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
PROCEDURE xrelates(
p_children_ids IN dz_swagger3_object_vry
,p_parent_id ... |
DROP DATABASE IF EXISTS burger_db;
CREATE DATABASE burger_db;
USE burger_db;
CREATE TABLE burgers
(
id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
name varchar(255) NOT NULL,
devoured BOOLEAN DEFAULT false
);
SELECT * FROM burgers;
|
select c_date, c_integer, max(c_integer) over() from j7_v order by 1, 2, 3;
|
<filename>CWU DB/travaux.sql
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Sam 05 Novembre 2016 à 16:36
-- Version du serveur : 5.7.9
-- Version de PHP : 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
<reponame>majia2968/Mental-Health-eScreening
/* **********************************************************/
/* Create Consult Rules and add needed assessment variables */
/* **********************************************************/
/* Step 1 Define Consult */
INSERT INTO consult(consult_id, name, vista_ien) VALUES (... |
<gh_stars>1-10
-- insert startup.lock in property table - https://app.camunda.com/jira/browse/CAM-8162 --
insert into ACT_GE_PROPERTY
values ('startup.lock', '0', 1); |
alter table if exists region drop column yb_prebuilt_ami;
|
-- \pset format unaligned
-- \pset fieldsep '\t'
with gtex as (
select distinct uri as Donor,
substring(jsonb_array_elements_text(payload->'aliases'), '([a-zA-Z0-9]+):') as AliasPrefix
from item
where object_type = 'HumanDonor'
)
select Donor, AliasPrefix
from gtex
where AliasPrefix = 'gtex'
;
|
<reponame>Zhaojia2019/cubrid-testcases
-- create class using Constraints DEFAULT -2147483648
create class t1 (
c1 int DEFAULT -2147483648
);
select * FROM db_attribute WHERE class_name='t1';
drop t1; |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 16, 2018 at 09:21 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>revert/graphile_worker.sql
-- Revert postgraphile_graphile_worker:graphile_worker from pg
BEGIN;
-- drop and cascade, to wipe out all cruft from graphile-worker install
drop schema graphile_worker cascade;
COMMIT;
|
<reponame>egirgin/junior-projects
CREATE TABLE `dbtify`.`album_artist` (
`id` INT NOT NULL AUTO_INCREMENT,
`album_id` INT NOT NULL,
`artist_id` INT NOT NULL,
PRIMARY KEY (`id`),
INDEX `album_idx` (`album_id` ASC) VISIBLE,
INDEX `artist_idx` (`artist_id` ASC) VISIBLE,
FOREIGN KEY (`album_id`)
REFERE... |
<gh_stars>0
-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.24-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 07, 2020 at 11:27 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
/*
Navicat MySQL Data Transfer
Source Server : Gibul
Source Server Version : 50508
Source Host : localhost:3306
Source Database : cuci_mobil
Target Server Type : MYSQL
Target Server Version : 50508
File Encoding : 65001
Date: 2019-12-18 22:21:50
*/
SET FOREIGN_KEY_CHECKS=0;
-- --... |
<reponame>vindcel/inventorypuskom<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 22 Mar 2019 pada 08.08
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ti... |
prompt FSM core Translation
prompt - creating messages and translatable items
@&CORE_DIR.messages/&DEFAULT_LANGUAGE./create_messages.sql
@&CORE_DIR.messages/&DEFAULT_LANGUAGE./TranslatableItemsGroup_FSM.sql
|
# https://www.hackerrank.com/challenges/the-pads
select concat(name,"(",left(occupation, 1),")") from occupations order by name;
select concat("There are total ", count(occupation), " ", lower(occupation), "s.")
from occupations
group by occupation
order by count(occupation), occupation;
|
<gh_stars>1-10
-- Инструкция SELECT, использующая простое выражение CASE
-- Подпись некоторых хоккеистов, которые празднуют юбилей.
SELECT firstName, lastName, birthDate
CASE EXTRACT(YEAR FROM birthDate)
WHEN 2000 THEN '20 в этом году!'
WHEN 1990 THEN '30 в этом году!'
WHEN 1980 THEN '40 в ... |
-- file:path.sql ln:30 expect:true
SELECT f1 FROM PATH_TBL
|
-- MKTG_ContactPerson TRL
-- 2021-10-15T09:13:17.858Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='Marketing Contact', PrintName='Marketing Contact',Updated=TO_TIMESTAMP('2021-10-15 11:13:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=544035 AND AD_La... |
<gh_stars>1000+
-- 29.03.2016 14:14
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,Description,EntityType,FieldLength,Help,IsActi... |
UPDATE `spell_bonus_data` SET `dot_bonus`=0.134 WHERE `entry`=774; |
<gh_stars>0
INSERT INTO `sys_page_compose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES
(NULL, 'profile', '1140px', 'Who Viewer Me Block', '_sk_who_viewed_me_caption_profile_block', 2, 0, 'PHP', 'return BxDolService::call(''w... |
-- apply changes
alter table ic.patient_disposition drop constraint if exists ck_patient_disposition_flag;
alter table ic.patient_disposition add constraint ck_patient_disposition_flag check ( flag in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20));
alter table ic.messages drop constraint if exists ck_messages_... |
DROP TABLE IF EXISTS contents CASCADE;
CREATE TABLE IF NOT EXISTS contents (
id INTEGER,
title VARCHAR(100),
director VARCHAR(100),
year VARCHAR(50),
genre VARCHAR(50),
PRIMARY KEY (id)
);
ALTER TABLE contents MODIFY id INTEGER NOT NULL AUTO_INCREMENT;
DROP TABLE I... |
<reponame>rainzha/JustHibernate
ALTER TABLE Employee
ADD COLUMN empGender INT(11); |
<reponame>nablarch/nablarch-fw-messaging<filename>src/test/java/nablarch/fw/messaging/sample/action/RegisterBook.sql
REGISTER_BOOK = INSERT INTO BOOK_DATA (
TITLE, PUBLISHER, AUTHORS
) VALUES (
:title, :publisher, :authors
)
INSERT_ERROR_LOG =
INS... |
<filename>sql/procedure/apl_samples/timeseries/segmented_create_train.sql
-- @required(hanaMinimumVersion,2.0.40)
-- ================================================================
connect USER_APL password <PASSWORD>;
SET SESSION 'APL_CACHE_SCHEMA' = 'APL_CACHE';
drop table MODEL_TRAIN_BIN;
create table MODEL_TRAIN_... |
SET foreign_key_checks = 0;
DROP TABLE IF EXISTS `store`;
DROP TABLE IF EXISTS `store_group`;
DROP TABLE IF EXISTS `store_website`;
SET foreign_key_checks = 1;
|
CREATE SCHEMA [sparse_columns]
|
/****** Object: Table [dbo].[T_OSM_Package_Storage] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_OSM_Package_Storage](
[ID] [int] IDENTITY(10,1) NOT NULL,
[Path_Local_Root] [varchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Path_Shared_Root] [varchar](256) COLLATE S... |
ALTER TABLE `data_import_jobs`
ADD COLUMN `datasetstate_id` int(11) NOT NULL DEFAULT 1 AFTER `is_update`; |
-- create gbrowse_sessions table to store gbrowse session data
-- instead of using text file
create table gbrowse_sessions
(
id char(32) not null primary key,
a_session long not null
);
|
<reponame>hhandoko/scala-http4s-realworld-example-app<filename>db/seed/R__Seed_test_data.sql<gh_stars>10-100
-- Truncate
-- ~~~~~~
TRUNCATE TABLE auth RESTART IDENTITY CASCADE;
TRUNCATE TABLE profile RESTART IDENTITY CASCADE;
-- Insert seed data
-- ~~~~~~
INSERT INTO profile (username, email)
VALUES ('john.doe',... |
-- Verify delivery:assign_password_reset_token on pg
BEGIN;
SELECT has_function_privilege(
'assign_password_reset_token(TEXT, TEXT, TEXT, INTERVAL)',
'execute');
ROLLBACK;
|
<reponame>msgoff/graph_search
insert into file_checksums (sha1,filepath) values ('fa99516ca595877558c738e7751023bf183c6787','/home/user/sympy/sympy/vector/vector.py');
insert into file_checksums (sha1,filepath) values ('8d56981b359980baa6be651bac7c28150e84dd17','/home/user/sympy/sympy/vector/tests/test_vector.py');
ins... |
ALTER TABLE `file_uploads`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
MODIFY `created` datetime(6) NOT NULL,
MODIFY `modified` datetime(6) NOT NULL,
MODIFY `hash` varchar(255) NOT NULL,
MODIFY `valid` tinyint(1) NOT NULL,
MODIFY `compat_with_app_id` int(10) unsigned DEFAULT NULL,
MODIFY `c... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 28, 2020 at 12:27 PM
-- Server version: 5.7.29-0ubuntu0.16.04.1
-- PHP Version: 7.3.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "... |
create table if not exists experiment(
exp_id integer primary key autoincrement,
exp_name text,
exp_description text,
var_name text
);
create table if not exists fact(
exp_id integer,
step_id integer,
var_name text,
val real,
errmsg text
); |
DROP SEQUENCE IF EXISTS mente.column_value_id_seq CASCADE;
DROP TABLE IF EXISTS mente.column_value_info;
DROP SEQUENCE IF EXISTS mente.column_attr_id_seq CASCADE;
DROP TABLE IF EXISTS mente.column_attr_info;
DROP SEQUENCE IF EXISTS mente.block_id_seq CASCADE;
DROP TABLE IF EXISTS mente.block_info;
DROP TABLE IF EXISTS ... |
--liquibase formatted sql
--changeset adriano:201810210022
--comment: Criando a estrutura da tabela PRODUTO
CREATE TABLE IF NOT EXISTS `lab04db`.`produto` (
`id` INT(11) NOT NULL COMMENT 'Identificador da tabela produto.',
`id_categoria` INT(11) NOT NULL COMMENT 'Identificador da tabela categoria.',
`nome... |
select ucase(name) from employee;
select lcase(name) from employee;
select *, mid(name,3,3)from employee;
select *, length(name) from employee;
select *, round(salary,0) from employee;
select now() from employee;
SELECT *, FORMAT(now(),'DD-MM-YYYY') AS JoiningDate FROM employee;
|
<reponame>yuting1214/Leetcode_Database
# Prerequisite
## 1. The sum of the length of **any** two sides of a triangle is greater than the length of the third side.
# Solution
SELECT *,
CASE
WHEN ( x + y - z) < 0 or ( x + z - y) < 0 or ( y + z - x) < 0
THEN 'No'
ELSE 'Yes'
... |
<filename>db/db/3table/upright/FM_MODULE.sql
drop table if exists FM_MODULE;
/*==============================================================*/
/* Table: FM_MODULE */
/*==============================================================*/
create table FM_MODULE
(
MODULE_ID varch... |
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 15, 2018 at 01:43 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
<filename>db/category.sql
SET NAMES 'utf8';
insert into media_category (`category_name`, `category_alias`, `num`) VALUES
('Мультфильмы', 'animation', 1),
('Наше кино', 'our_film', 2),
('Мировое кино', 'world_film', 3),
('Документальное', 'doc_film', 4),
('Юмор', 'humor', 5),
('Увлечения', 'liking', 6),
('Наш Сериал',... |
update sites set settings = jsonb_set(settings, '{public}', '"public"') where settings->'public' = 'true';
update sites set settings = jsonb_set(settings, '{public}', '"private"') where settings->'public' = 'false';
|
ALTER TABLE dbo.Product
ADD CONSTRAINT PK_Product PRIMARY KEY CLUSTERED (ProductID);
ALTER TABLE dbo.Customer
ADD CONSTRAINT PK_Customer PRIMARY KEY CLUSTERED (CustomerID);
ALTER TABLE dbo.[Order]
ADD CONSTRAINT PK_Order PRIMARY KEY CLUSTERED (OrderID);
ALTER TABLE dbo.Employee
ADD CONSTRAINT PK_Employee P... |
<filename>Script-14 DML.sql
SELECT * FROM login
SELECT * FROM system
SELECT * FROM Rules
SELECT * FROM LoginRules
INSERT INTO Login (login, passaword, Nome, Email)
VALUES ('<EMAIL>','pf2543', '<NAME>' , '<EMAIL>'),
('<EMAIL>',' leo123', '<NAME>' , '<EMAIL>'),
('<EMAIL>',' am1601', '<NAME>' , '<EMAIL>'),
('... |
-- DB/ITEM LOOT: Fix all item loots template erros on startup
-- Mysterious Egg Don't need any loot is controling be script
-- Script: Item::GenerateItemRandomPropertyId(39883));
DELETE FROM `item_loot_template` WHERE entry=39878; |
--
-- Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
--
-- Licensed under the Universal Permissive License v 1.0 as shown
-- at http://oss.oracle.com/licenses/upl
--
rem
Rem NAME
Rem pls_examp4.sql - <one-line expansion of the name>
Rem DESCRIPTION
Rem <short description o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.