text stringlengths 6 9.38M |
|---|
CREATE PROCEDURE Staging.[GetConnections]
AS
BEGIN
SELECT ConnectionName,
ConnectionString
FROM Staging.Connections
END
|
select g.nome, c.nome, c.ano
from gafanhotos as g left outer join cursos as c
on c.idcurso = g.cursopreferido
order by g.nome;
|
select
emp.id,
emp.person_id,
coalesce(person.last_name || ' ' || person.name|| ' ' || person.middle_name,'') as person_fio,
coalesce(person.last_name,'') as person_last_name,
coalesce(person.name ,'') as person_name,
coalesce(person.middle_... |
/* MODELAGEM DE CLIENTE */
CREATE DATABASE COMERCIO
USE COMERCIO
CREATE TABLE CLIENTE(
IDCLIENTE INT PRIMARY KEY AUTO_INCREMENT,
NOME VARCHAR(30) NOT NULL,
SEXO ENUM('M','F') NOT NULL,
EMAIL VARCHAR(50) UNIQUE,
CPF VARCHAR(15) UNIQUE
);
CREATE TABLE TELEFONE(
IDTELEFONE INT PRIMARY KEY AUTO_INCREMENT,
TIPO EN... |
SELECT usuaris.id_usuari, usuaris.nom, videos.titol, videos.descripcio
FROM usuaris, videos
WHERE usuaris.id_usuari = videos.usuari_id;
|
create database egg_article;
use egg_article;
create table article(
id int(10) not null auto_increment,
img text default null comment '缩略图',
title varchar(80) default null comment '文章标题',
summary varchar(300) default null comment '文章简介',
content text default null comment '文章内容',
createTime tim... |
DELETE FROM journal_procent WHERE 1=1;
INSERT INTO journal_procent VALUES(0,'001122', '2021-10-1', '2021-11-1', 345);
INSERT INTO journal_procent VALUES(1,'001122', '2021-11-3', '2021-12-1', 885);
INSERT INTO journal_procent VALUES(10,'001122', '2021-12-1', '2021-12-6', 885);
INSERT INTO journal_procent VALUES(2,'0331... |
CREATE TABLE IF NOT EXISTS estado (
id INT AUTO_INCREMENT PRIMARY KEY,
nome varchar(100) NOT NULL,
sigla varchar(2) NOT NULL,
ts_data_hora_cadastro timestamp NULL,
ts_data_hora_ultima_atualizacao timestamp NULL,
CONSTRAINT estado_pkey PRIMARY KEY (id)
); |
--
-- 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;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpg... |
--数据备份定时job 凌晨一点执行
declare
job number;
begin
sys.dbms_job.submit(job,
'backup_data_prc;',
sysdate,
'TRUNC(SYSDATE)+1+23/24');
commit;
end;
/
--本地自我知识库数据更新
declare
job number;
begin
sys.dbms_job.submit(job,
... |
DROP INDEX IF EXISTS bets_player_id_tournament_id;
DROP INDEX IF EXISTS backers_bet_id_player_id;
DROP TABLE IF EXISTS backers;
DROP TABLE IF EXISTS bets;
DROP TABLE IF EXISTS players;
DROP TABLE IF EXISTS tournaments;
DROP TYPE IF EXISTS enum_status;
|
ALTER TABLE "Consignment"
ADD COLUMN "ExportVersion" text;
|
-- script that lists all databases
-- of your MySQL server.
SHOW DATABASES;
|
/* Formatted on 17/06/2014 18:06:30 (QP5 v5.227.12220.39754) */
CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCRE0_ST_SAB_XRA
(
ID_DPER,
COD_ABI_ISTITUTO,
COD_ABI_CARTOLARIZZATO,
COD_NDG,
COD_SAB,
FLG_SOGLIA,
NUM_GIORNI_SCONFINO,
COD_RAP,
NUM_GIORNI_SCONFINO_RAP,
VAL_IMP_SCONFINO
)
AS
WITH T... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 08, 2016 at 02:46 PM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
-- Write your sql commands to create your db schema here.
-- It should create a table in a new table in the db/ directory.
-- schema_migration.sql
-- creates pokemon table (FAILED - 1)
-- has an autoincrementing id column (FAILED - 2)
-- has a name column (FAILED - 3)
-- has a type column (FAILED - 4)
CREATE ... |
CREATE DATABASE `db_kinoposhuk`; |
SELECT 'projects: MID-->SN' AS FD, CASE WHEN COUNT(*)=0 THEN 'Gildir' ELSE 'Gildir ekki' END AS VALIDITY
FROM(
SELECT MID
FROM projects
GROUP BY MID
HAVING COUNT(DISTINCT SN) > 1
) X;
|
SELECT COUNT(review_id)
FROM n_votes_table
SELECT COUNT(review_id)
FROM n_votes_table
WHERE star_rating = 5
SELECT 14704.0 / 37831.0
0.38867595358304036372 |
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 10, 2017 at 12:51 am
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
use PHARMACY
select worker.last_name,worker.first_name , count([check].id_check) as [checks]
from worker inner join [check] on worker.id_worker=[check].id_worker
group by first_name, last_name order by checks desc
select symptom.symptom , medicine.medicine
from medicine inner join [medicine-ill] on medicine.id_me... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Июн 23 2021 г., 11:14
-- Версия сервера: 10.4.18-MariaDB
-- Версия PHP: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 29, 2017 at 02:03 AM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 7.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
INSERT INTO users (name, email, password_hash, avatar, latitude, longitude)
VALUES
('Bryce McMath', 'bryce.j.mcmath@gmail.com', '$2a$11$tgzZX/2iCloQ5bYc7TJsYOgkhImb4/bOcNMRofZVI9qrqK47zIuxq',
'//www.gravatar.com/avatar/a17548ea579a54c180a7d37a7818501a?s=200&r=pg&d=mm', '48.428', '-123.365');
('Wilson Wong', '... |
SELECT TOP(CONVERT(INT, /*topRow*/))
--契約番号
COLLATERAL_INFO.CONTRACT_NO AS CONT_NO,
--拠点
BRANCH_MST.BRANCH_NAME AS BRANCH,
--契約状況
CDMST1.CODE_NAME AS CONT_STATUS_NAME,
--顧客名称
CUST1.CUSTOMER_ABBR_NAME AS CUST_NM,
--担保物No.
COLLATERAL_INFO.COLLATERAL_NO AS COLL_NO,
--担保物名称
COLLATERAL_INFO.COLLATERAL_NAME AS CO... |
CREATE VIEW "A" AS SELECT 1 AS foo;
|
ALTER TABLE
EPS_PROPOSAL
ADD
(
ANTICIPATED_AWARD_TYPE_CODE NUMBER(3,0)
)
/
ALTER TABLE EPS_PROPOSAL ADD PROPOSALNUMBER_GG VARCHAR2(12)
/
|
-- ----------------------------
-- Records
-- ----------------------------
INSERT INTO `dictionary` VALUES ('1', 'Frame', 'F1', 'Loose Frame', '1');
INSERT INTO `dictionary` VALUES ('2', 'Frame', 'F2', 'Damaged Frame', '2');
INSERT INTO `dictionary` VALUES ('3', 'Frame', 'F3', 'Rust-though on Frame', '3');
INSER... |
-- MySQL Script generated by MySQL Workbench
-- Sat Dec 30 19:36:13 2017
-- Model: New Model Version: 1.0
-- 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='TR... |
select count(*) from departments;
select count(*) from dept_emp;
select count(*) from dept_manager;
select count(*) from employees;
select count(*) from salaries;
select count(*) from titles;
|
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 22, 2020 at 12:39 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.3.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
USE repo_manager;
-- 初始化苹果类型
INSERT INTO dic_apple_type(name, value) VALUES(1, '富士' );
INSERT INTO dic_apple_type(name, value) VALUES(2, '秦冠' );
-- 初始化苹果尺寸
INSERT INTO dic_apple_size(name, value) VALUES(1, '60' );
INSERT INTO dic_apple_size(name, value) VALUES(2, '65' );
INSERT INTO dic_apple_size(name, ... |
--ex1: Dans la table languages, afficher toutes les données de la table.
SELECT * FROM webDevelopment.languages;
--ex2: Dans la table languages, afficher toutes les versions de PHP.
SELECT version FROM webDevelopment.languages WHERE languages ='PHP';
--ex3: Dans la table languages, afficher toutes les versions de PHP... |
-- Your SQL goes here
alter table score modify column strafes integer not null;
alter table score modify column jumps integer not null; |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2016-06-13 09:30:12
-- 服务器版本: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET ... |
USE regalonatural; DELETE FROM regalonatural.ps_order_invoice_tax;
|
DROP TABLE IF EXISTS shard_tables;
DROP TABLE IF EXISTS stg_shard_tables;
DROP TABLE IF EXISTS shard_nodes;
DROP TABLE IF EXISTS stg_shard_nodes;
CREATE TABLE shard_nodes
(
node_id INTEGER NOT NULL AUTO_INCREMENT,
type VARCHAR(64) NOT NULL,
server VARCHAR(64) NOT NULL,
db_name VARCHAR(64) NOT NULL,
db_user VARCHA... |
-- Create dERP on PostgreSQL installation from
-- command line, for automation via shell thing
-- at a later time
createdb dERP
psql dERP
-- Actual SQL
create database dERP;
create user derpette with password 'boost';
grant all privileges on database dERP to derpette; |
select res.* from (
SELECT code FROM compare_icd.result) res;
select res1.code,res1.label,res1.description,res1.distance, concat_ws('\n',res2.new1,res1.result_error) as result_error from (
select r.code,r.label,r.description,r.distance, group_concat(r.values separator '\n') as result_error
from compare_icd.result ... |
-- Update descriptions for 'end_date' & 'ClosureStartDate'
UPDATE "DisplayProperties"
SET "Value" = 'The date that the most recent change was made to this record.'
WHERE "PropertyName" = 'end_date' AND "Attribute" = 'Description';
UPDATE "DisplayProperties"
SET "Value" = 'This is the date the closure period begins.'
... |
BEGIN TRANSACTION;
-- Wanyi
-- • Find 5 locations ids and their names OF THE LOCATION that are checked in by the most number of users in the last 10 days. (assume they mean - find the top 5 locations where the most number of users checked into the last 10 days.)
SELECT TOP 5
Location.location_id, Location.name, NewC... |
use asg1;
select * from ORDERS where Odate in (select Odate from ORDERS where Odate = '1990-03-10' or Odate = '1990-04-10');
select * from CUSTOMERS where Snum in (select Snum from SALESPERSON where Sname = 'Peel' or Sname = 'Motika');
select * from CUSTOMERS where Cname REGEXP '^[a-g].*$';
select * from CUSTOMERS ... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: lordstorm
* Created: Feb 2, 2019
*/
CREATE TABLE `customer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`first_name`... |
/* DEBUG: List shows with an episode count that doesn't match MAX(played_in.episodes) */
SELECT *
FROM shows
INNER JOIN (
SELECT show_id, MAX(played_in.episodes) AS max_episodes
FROM played_in
GROUP BY show_id
) sub ON sub.show_id = shows.id
WHERE sub.max_episodes <> shows.episodes
/* DEBUG: Update episod... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 06-Ago-2018 às 10:52
-- Versão do servidor: 10.1.32-MariaDB
-- PHP Version: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
ALTER TABLE dbo.TblIntervention ADD NbOfPersons real DEFAULT ((0));
|
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 29, 2019 at 04:26 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
CREATE TABLE "tsca_mtcargo" (
"id_cargo" SERIAL NOT NULL ,
"descripcion" VARCHAR(150) NOT NULL ,
PRIMARY KEY ("id_cargo")
);
CREATE TABLE "tsca_lesiones" (
" cod_lesion" VARCHAR(10) NOT NULL ,
"descripcion" VARCHAR(200) NOT NULL ,
PRIMARY KEY (" cod_lesion")
);
CREATE TABLE "tsca_accidente" (
"id_reporte" SERIA... |
DROP TABLE IF EXISTS value_set_member;
DROP TABLE IF EXISTS value_set;
CREATE TABLE value_set (
dbid INT AUTO_INCREMENT,
id VARCHAR(50) NOT NULL,
name VARCHAR(150) NOT NULL,
PRIMARY KEY value_set_pk (dbid),
UNIQUE INDEX value_set_uq (id)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE value_... |
CREATE TABLE IF NOT EXISTS user(
user_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(25) NOT NULL,
password VARCHAR(25) NOT NULL,
email VARCHAR(50) NOT NULL,
discr VARCHAR(25) NOT NULL
) ENGINE=INNODB;
CREATE TABLE IF NOT EXISTS student(
user_id INTEGER,
PRIMARY KEY(user_id),
FOREIGN KEY(user... |
ALTER TABLE site ADD has_gps INT(1) DEFAULT 0, MODIFY device_type enum('StreetLite360','LED Bus','DiskLite','DiscLite');
UPDATE site SET has_gps = 0, device_type = 'DiscLite' WHERE device_type = 'DiskLite';
UPDATE site SET has_gps = 1 WHERE device_type != 'DiscLite';
ALTER TABLE site MODIFY device_type enum('StreetLite... |
-- CREATE tables in learning
-- syntax
-- CREATE TABLE table_name(
-- col1 col1 constraints,
-- col2 col2 constraints,
-- table constraints)
-- account table
CREATE TABLE account(
user_id serial PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
password VARCHAR(50) NOT NULL,
email VARCHAR(200) UNIQUE NOT NULL... |
SELECT *
FROM pokemon
WHERE is_default = 1
and LCASE(identifier) like LCASE(:name) |
select * from KRNS_PARM_T
where PARM_NM = 's2sschedulercronExpressionstarttime';
update KRNS_PARM_T
set TXT='01-JAN-2020 01:00 AM'
where PARM_NM = 's2sschedulercronExpressionstarttime'; |
DROP TABLE ps4;
DROP TABLE ps3;
DROP TABLE xboxone;
DROP TABLE xbox360;
DROP TABLE pc;
DROP TABLE game;
CREATE TABLE game (
gameID int NOT NULL,
title varchar(100) NOT NULL,
physical bit,
story bit,
complete bit,
platform varchar(10),
PRIMARY KEY (gameID)
);
INSERT INTO game ... |
with tbl as (
select
p.as_of_date,
p.alert,
a.age_group,
p.label,
p.score,
p.model,
e.experiment, e.fold, e.feature_set, e.param_config, e.algorithm,
row_number () over ( order by p.score desc) as k
from results.predictions p
join results.experiments e on e.model = p.model
join semantic.alerts a on... |
create table if not exists candidacy (
id int AUTO_INCREMENT,
product_id int not null,
url text,
created_at timestamp not null default current_timestamp,
updated_at timestamp not null default current_timestamp on update current_timestamp,
INDEX (id),
FOREIGN KEY (product_id) REFERENCES produ... |
drop table if exists Filmovi;
drop table if exists Karta;
drop table if exists Projekcije;
drop table if exists Sale;
drop table if exists Sedista;
drop table if exists Tipovi_Projekcija;
drop table if exists Users;
drop table if exists Zanrovi;
create table Filmovi(
ID integer primary key,
Naziv varchar(50)... |
select DATEPART(MONTH, Adm_Date) as [month_number]
, COUNT(ptno_num) as [patient_count]
from smsdss.BMH_PLM_PtAcct_V
where Adm_Date >= '2017-02-01'
and Adm_Date < '2017-04-01'
and tot_chg_amt > 0
and LEFT(PtNo_Num, 4) != '1999'
and PtNo_Num < '20000000'
and Plm_Pt_Acct_Type = 'i'
and hosp_svc != 'psy'
--a... |
-- ****************************************************
-- ** REQUIRES
-- ** - FHIR/Language
-- ** - NHSDD/Religion
-- ** - NHSDD/Speciality
-- ** - NHSDD/Inpatient
-- ** - NHSDD/Ethnicity
-- ****************************************************
-- Ensure core code scheme exists
INSERT IGNORE INTO concept (do... |
/**
* @version $Id: SNIC02050Service_getShikugunKukuri3List_Sel_01.sql 21845 2014-08-19 12:29:36Z p_hyakutake_hidekazu $
*/
SELECT DISTINCT
T1.SHIKUGUN_KUKURI3_CD
,T1.SHIKUGUN_KUKURI3_NM
,T1.SHIKUGUN_KUKURI3_DISP_SEQ
FROM
MA_CM_MA_JUSHO_KUKURI_NET T1
WHERE
T1.TODOFUKEN_CD = /*todofukenCd*/'13'
ORDER BY
... |
/* Seeds for SQL table. We haven't discussed this type of file yet */
USE employeeDB;
/* Insert 3 Rows into your new table */
INSERT INTO department (name)
VALUES ("Science");
INSERT INTO department (name)
VALUES ("Developer");
INSERT INTO department (name)
VALUES ("Engineer");
|
SET SQL_MODE
= "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT
= 0;
START TRANSACTION;
SET time_zone
= "+00:00";
--
-- Database: `lab5`
--
--P
-- Table structure for table `gallery`
--
CREATE TABLE `gallery`
(
`user_id` int
(11) NOT NULL,
`username` varchar
(15) NOT NULL,
`email` varchar
(64) NOT NULL,
`first_name`... |
select employee.Fname, employee.Lname, mgr.Fname, mgr.Lname
from employee join employee mgr on employee.Super_ssn = mgr.Ssn; |
--Read initial CSV
CREATE TABLE FLInsur(
"policyID",
"statecode",
"county",
"eq_site_limit",
"hu_site_limit",
"fl_site_limit",
"fr_site_limit",
"tiv_2011",
"tiv_2012",
"eq_site_deductible",
"hu_site_deductible",
"fl_site_deductible",
"fr_site_deductible",
"point_latitude",
"point_longitude... |
CREATE TABLE log
(
id integer not null primary key autoincrement,
activity integer default 0 not null
references activity
on update cascade on delete restrict,
what text not null,
transport integer
references meansOfTransport
on update cascade on d... |
select * from sponsor
where sponsor_name like 'Office of Information Mgmt % Technology-HI'
or sponsor_name like 'Children%s Tumor Foundation';
select *
from sponsor_hierarchy
where sponsor_code in (select sponsor_code from sponsor
where sponsor_name like 'Office of Information Mgmt % Technolo... |
CREATE TABLE cashback_tbl
(
id_cashback INT NOT NULL AUTO_INCREMENT,
id_genero INT,
dia_semana INT,
porcentagem_cash_back INT,
PRIMARY KEY (id_cashback)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
INSERT INTO cashback_tbl(id_genero, dia_semana, porcentagem_cash_back)
VALUES(1,1,40),
... |
TRUNCATE TABLE OLE_DLVR_BATCH_JOB_T
/
INSERT INTO OLE_DLVR_BATCH_JOB_T (JOB_CRON_EXPRSN,JOB_ID,JOB_TRG_NM,OBJ_ID,ROW_ACT_IND,VER_NBR)
VALUES ('0 0 2 * * ?','2','generateNoticesJob','2','Y',1)
/
INSERT INTO OLE_DLVR_BATCH_JOB_T (JOB_CRON_EXPRSN,JOB_ID,JOB_TRG_NM,OBJ_ID,ROW_ACT_IND,VER_NBR)
VALUES ('0 0 2 * * ?','3',... |
/* В таблице складских запасов storehouses_products в поле value могут встречаться самые разные цифры: 0, если товар закончился и выше нуля,
если на складе имеются запасы. Необходимо отсортировать записи таким образом, чтобы они выводились в порядке увеличения значения value.
Однако нулевые запасы должны выводиться в... |
select cast(stratum_1 as integer) as age_at_index,
count_value as num_persons
from @resultsSchema.dbo.heracles_results
where analysis_id in (1800)
and cohort_definition_id in (@cohortDefinitionId) |
-- Your SQL goes here
CREATE TABLE Packages (
UserId INTEGER PRIMARY KEY,
PackageList TEXT NOT NULL
); |
-- Initial pilot judgment transfers were set against the incorrect transferring body.
-- HM Courts and Tribunals Service is the correct body for the MoJ
DO $$
DECLARE
hmctsBodyId "Body"."BodyId"%TYPE;
mojBodyId "Body"."BodyId"%TYPE;
BEGIN
SELECT "BodyId" INTO hmctsBodyId FROM "Body" WHERE "TdrCode" = 'TDR-... |
/*
* Tables
* Inverted Index Toolkit <http://code.google.com/p/inverted-index/>
* Apache License 2.0, blah blah blah.
*/
DROP TABLE IF EXISTS article;
/*
* This table is a simple article table
*/
CREATE TABLE IF NOT EXISTS article (
article_id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
title text NOT NULL,... |
-- MySQL Script generated by MySQL Workbench
-- 10/05/15 23:10:17
-- Model: New Model Version: 1.0
-- 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='TRADITION... |
-- *********************************************
-- Title: Default Azure SQL User Setup - DEV
-- Instructions: Run the first section on the
-- 'master' database only. Then run the
-- second section on Each Database you
-- intend to start with default DEV permissions
-- *********************************************
... |
-- DROP DATABASE IF EXISTS cf49yhdwq9nbqknj;
-- CREATE DATABASE cf49yhdwq9nbqknj;
-- USE cf49yhdwq9nbqknj;
-- CREATE TABLE burgers
--Create original DB
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
-- Create the table plans.
CREATE TABLE burgers(
id INT NOT NULL AUTO_INCREMENT,
... |
create table Prototype.tblArgument (
ArgumentId INTEGER NOT NULL AUTO_INCREMENT,
ArgumentName VARCHAR(255) NOT NULL,
OwnerId INTEGER NOT NULL,
ClaimId INTEGER NOT NULL,
PRIMARY KEY (ArgumentId)
); |
select * from t_board;
alter table t_board add reply_cnt number(5) default 0;
select * from t_reply;
delete t_reply;
commit;
update t_board set reply_cnt = 0;
-- 댓글 테이블 생성
create table t_reply (
no number(5) primary key,
board_no number(5) not null,
content varchar2(1000) not null,
writer varchar2... |
CREATE SCHEMA [HomeAura]
|
--la vue pour voir le solde de tous les enfants
CREATE OR REPLACE VIEW soldeE(idEnfant,nomEnfant,prenomEnfant,solde)
AS SELECT idEnfant,nomEnfant,prenomEnfant,SUM(montant)
FROM ENFANT NATURAL LEFT JOIN FLUX
GROUP BY idEnfant,nomEnfant,prenomEnfant;
--si on veux voir le solde dĄŻun enfant , ici on pr... |
CREATE DATABASE IF NOT EXISTS `bd-hibernate-muchos-a-muchos` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `bd-hibernate-muchos-a-muchos`;
-- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: bd-hibernate-muchos-a-muchos
-- ------------------------------------------------------
... |
CREATE TABLE MCRE_OWN.T_MCRE0_SC_VINCOLI_LGD_GRI_S(
ID_FLUSSO NUMBER,
ID_DPER NUMBER(8),
COD_ABI VARCHAR2(5 BYTE),
COD_SEGMENTO_ECO VARCHAR2(2 BYTE),
COD_TIPO_RISCHIO VARCHAR2(2 BYTE),
COD_TIPO_PROD VARCHAR2(1 BYTE),
FLG_CASSA_FIRMA VARCHAR2(2 BYTE),
COD_AREA_GEO VARCHAR2(2 BYTE),
COD_TI... |
create database DB_Spa
use DB_Spa
create table Cliente(
cedula varchar(50) not null,
nombre varchar(50) not null,
telefono varchar(50) not null,
celular varchar(50) not null,
email varchar(50) not null,
primary key(cedula)
)
create table Procedimiento(
cod_pro int identity,
tipo_pro varchar(50) not null,
de... |
#sql("getLatestAppVersion")
select * from app_version order by versionCode desc;
#end
#sql("getApkDownloadUri")
select * from app_version where versionCode = #para(versionCode);
#end |
[
{
"userAccount": "misterManager",
"userPassword": "password",
"userFirstName": "Mister",
"userLastName": "Manager",
"managerID": 1,
"isManager": 1,
"sundayAvailable": 1,
"mondayAvailable": 1,
"tuesdayAvailable": 1,
"wednesdayAvailable... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 30, 2019 at 10:08 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
SELECT *
FROM students
WHERE quality1 = 'evil' AND quality2 = 'cunning'
OR quality1 = 'brave' AND quality2 <> 'evil'
OR quality1 = 'studious' OR quality2 = 'intelligent'
OR quality1 = 'hufflepuff' OR quality2 = 'hufflepuff'; |
--Creating customers data table
CREATE TABLE customers (
custormer_id SERIAL,
ssn INT NOT NULL,
driver_license VARCHAR(25) NOT NULL,
first_name VARCHAR(45) NOT NULL,
last_name VARCHAR(45) NOT NULL,
cust_addr VARCHAR(45) NOT NULL,
cust_city VARCHAR(45) NOT NULL,
cust_state VARCHAR(45) NOT NULL,
country VARCHAR(45) NOT N... |
SELECT
SUM(A)
FROM
(
SELECT
COUNT(1) AS A
FROM CUSTOMER_MST -- 取引先マスタ
WHERE
1 = 2
-- IF 削除処理 = TRUE OR 親会社フラグを外す の場合
/*IF (dto.deleteFlg == oneValue || dto.parentFlg != oneValue) */
OR CUSTOMER_MST.PARENT_COMPANY_CODE = /*dto.customerCode*/''
OR CUSTOMER_MST.COMBINED_PARENT_COMPANY_CODE = /*dto.c... |
CREATE TABLE `user_upgrade` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL,
`subscription_keyword` varchar(32) CHARACTER SET utf8 DEFAULT NULL,
`date_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`transaction_key` text CHARACTER SET utf8,
`date_completed` timestamp NULL DEFAUL... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 26 Jun 2020 pada 03.44
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
(SELECT c.CountryName AS [Country],
ISNULL(p.PeakName, '(no highest peak)') AS [Highest Peak Name],
ISNULL(p.Elevation,0) AS [Highest Peak Elevation],
ISNULL(m.MountainRange, '(no mountain)') AS [Mountain]
FROM Countries c
LEFT JOIN MountainsCountries mc
ON mc.CountryCode = c.CountryCode
LEFT JOIN Mountains m
ON m.Id... |
CREATE TABLE IF NOT EXISTS movements (
id SERIAL PRIMARY KEY,
uses_weight BOOLEAN NOT NULL DEFAULT TRUE,
uses_distance BOOLEAN NOT NULL DEFAULT FALSE,
uses_duration BOOLEAN NOT NULL DEFAULT FALSE,
name VARCHAR(100),
UNIQUE(name)
);
ALTER TABLE exercises ADD IF NOT EXISTS movement_id INT NOT NULL REFERENCE... |
--创建数据库
create database python_test_1 charset=utf8;
--使用数据库
use python_test_1;
--stu表
create table students(
id int UNSIGNED PRIMARY key AUTO_INCREMENT not null,
name varchar(20) default '',
age tinyint UNSIGNED default 0,
height DECIMAL(5,2),
gender enum('男','女','中性','保密') DEFAULT '保密',
cls_i... |
DROP TABLE IF EXISTS active_slot;
DROP TABLE IF EXISTS active_segment;
DROP TABLE IF EXISTS account_segment;
DROP TABLE IF EXISTS slot;
DROP TABLE IF EXISTS segment;
ALTER TABLE site DROP FOREIGN KEY `site_ibfk_1`, DROP KEY `content_wheel_id`, DROP COLUMN content_wheel_id;
DROP TABLE IF EXISTS content_wheel;
|
#query to get all the ppt/pptx submitted files that are stored on challenges.epals.com
select uploaded_files, postmeta.meta_value as WebFileStorage
from wp_postmeta as postmeta
inner join
(
select submit_time,
max(if(`field_name`='uploaded_files_ids', `field_value`, null )) AS 'uploaded_files_... |
#brainbuster number 1
#first and last name, email address for customers from store 2
#This for example would be to pull all of the people we want to target for an
#email campaign
SELECT
first_name, last_name,email
FROM
customer
WHERE
store_id = 2
; |
-- +migrate Up
CREATE TABLE admin
(
emp_id varchar(20) REFERENCES employee (id) PRIMARY KEY
);
-- +migrate Down
DROP TABLE admin; |
SELECT wd.DepositGroup,
SUM(wd.DepositAmount) AS [TotalSum]
FROM WizzardDeposits AS wd
WHERE wd.MagicWandCreator = 'Ollivander family'
GROUP BY wd.DepositGroup
HAVING SUM(wd.DepositAmount) < 150000
ORDER BY [TotalSum] DESC |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.