text stringlengths 6 9.38M |
|---|
-- https://www.codewars.com/kata/5809b9ef88b750ab180001ec/train/sql
-- Type your query here
SELECT * FROM students WHERE IsActive; |
SELECT Person.name Old_Customer, Customer.customer_enroldate
FROM Person INNER JOIN
Customer ON Person.person_id=Customer.person_id
where customer_enroldate < '01-JAN-18';
|
create table noticeBoard(
tno number(10,0) not null,
title varchar2(50) not null,
writer varchar2(50) not null,
content varchar2(300) not null,
regdate date default sysdate,
PRIMARY key(tno)
);
create SEQUENCE tno_seq Increment by 1 start with 1 NOCACHE; |
--
-- 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 search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = fals... |
insert into SystemRights (id,rightdesc,righttype) values (457,'知识积累创新报表查看权限','1')
/
insert into SystemRightsLanguage (id,languageid,rightname,rightdesc) values (457,7,'知识积累创新报表查看权限','知识积累创新报表查看权限')
/
insert into SystemRightsLanguage (id,languageid,rightname,rightdesc) values (457,8,'知识积累创新报表查看权限','doccreativereport')... |
DELETE FROM data_import_complete_copy
WHERE (StartLatitude <= 53.67) && (StartLongitude <= 8.22) |
INSERT INTO store (id, name) VALUES ('1', 'Loja do Max');
INSERT INTO store (id, name) VALUES ('2', 'Loja da Gisele');
INSERT INTO store (id, name) VALUES ('3', 'Loja do Ivan');
INSERT INTO store (id, name) VALUES ('4', 'Loja do Luiz');
INSERT INTO supplier (id, name) VALUES ('1', 'Revendedora LoLBeer');
INSERT INTO ... |
INSERT INTO Reader(username, password, fullname) VALUES ('craig','password','Craig Walls'); |
use sys;
#1
CREATE TABLE Employee(
code CHAR(6) PRIMARY KEY,
name VARCHAR(80),
dob date,
designation VARCHAR(100),
salary FLOAT
);
INSERT INTO Employee (code, name, dob, designation, salary)
VALUES
('gm0121','Monica','2000-10-05','General Manager',50000.25),
('pm2918','Phoebe','1998-11-15','Product... |
INSERT INTO `yourls_options` ( `option_name`, `option_value`) VALUES
('active_plugins', 'a:1:{i:0;s:29:"yourls-ldap-plugin/plugin.php";}');
|
select * from gsales
select * from goods
select * from salesman
--展示所有商品列表所用多表联立的sql解释:
------------------------------------------------------
select gname,gprice,gnum, allSum --所求新表的项目
from goods, (select gid as salesid,sum(snum) as allSum --整个大括号里面代表一张表
from gsales ... |
CREATE TABLE EMP
(
EMP_ID STRING,
NAME VARCHAR2(10),
MANAGER_ID bit
) |
CREATE TABLE guest (
id CHAVE NOT NULL,
id_operating_system CHAVE,
id_web_browser CHAVE,
id_customer CHAVE,
javascript BOOLEAN,
screen_resolution_x INTEGER,
screen_resolution_y INTEGER,
screen_color INTEGER,
sun_java BOOLEAN,
adobe_flash ... |
--RULE FINDS ALL RELATED TO CASE TASKS THAT ARE ELIGIBLE FOR STARTING AND STARTS THEM
declare
v_CaseId Integer;
v_stateNew nvarchar2(255);
v_stateStarted nvarchar2(255);
v_stateAssigned nvarchar2(255);
v_stateInProcess nvarchar2(255);
v_stateResolved nvarchar2(255);
v_stateClosed nvarchar2(255);
v_state... |
ALTER TABLE "public"."users" ADD COLUMN "avatarURI" jsonb NULL; |
-- =========================================================================================================
-- USDA National Nutrient Database for Standard Reference, Release 27 (http://www.ars.usda.gov/ba/bhnrc/ndl)
-- This file was generated by http://github.com/m5n/nutriana
-- Run this SQL with an account that has ... |
-- phpMyAdmin SQL Dump
-- version 3.3.3
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 11-01-2012 a las 18:48:19
-- Versión del servidor: 5.1.47
-- Versión de PHP: 5.3.2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 S... |
-- Table: public.sstv_tx_geometries
-- DROP TABLE public.sstv_tx_geometries;
CREATE TABLE public.sstv_tx_geometries
(
"ID" bigint NOT NULL DEFAULT nextval('sstv_tx_geometries_seq'::regclass),
"LOG_ID" bigint NOT NULL,
point_start geometry NOT NULL,
point_end geometry NOT NULL,
line_points_start_end geometr... |
CREATE TABLE `favorites` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`UUID` varchar(255) DEFAULT NULL,
`version` bigint(20) DEFAULT NULL,
`categoryId` int(11) DEFAULT NULL,
`userId` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK_b4ouknomrpfl1tuk87igwnige` (`categoryId`),
KEY `FK_cu86eu5p1dv4ktc3nutjyachn... |
INSERT INTO public.school_year (id, start_date, end_date) VALUES (1301, '2017-09-01', '2018-07-22'); |
DROP TABLE IF EXISTS voting;
DROP TABLE IF EXISTS bills;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS sessions;
DROP TABLE IF EXISTS deputies;
CREATE TABLE deputies(
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
surname TEXT NOT NULL,
gender INTEGER NOT NULL,
birthday TIMESTAMP WITH TIME ZONE N... |
UPDATE `alertsystem`.`resources` SET `resourceName` = 'Alert Management', `resourceURL` = 'AlertManagement.jsp' WHERE `resources`.`resourceId` = 4;
CREATE TABLE alertvacation ( Vacation_Id int NOT NULL AUTO_INCREMENT,
Vacation_title VARCHAR(50),
... |
--https://docs.google.com/spreadsheets/d/1FzyFf-_hSYqSshLnSpHpz2TyuwxhbsXuWyULBbS14dg/edit#gid=0
--Manual overrides for the requested_delivery_date
with recency as (
select
salesordernumber as sales_order_number,
revisedrdd::date as revised_requested_delivery_date,
row_number() over(partition by salesord... |
update hpfieldelement set fieldname=743 where elementid=10 and fieldcolumn='planendtime'
/
delete from hpfieldelement where elementid=10 and fieldcolumn='planenddate'
/
update hpfieldelement set fieldwidth=100 where elementid=10 and fieldColumn='planendtime'
/
|
-- ANALYTICS2_PROVISIONING_ENTRY_FACT
desc ANALYTICS2_PROVISIONING_ENTRY_FACT;
-- Endpoint para entradas resolvidas (com sucesso e erro) (range de data)
select fact.date,
sum(created) as created,
avg(averageTime) as averageTime,
sum(errorFinalized) as errorFinalized,
sum(open) as open,
sum(successFinalize... |
/*
Navicat MySQL Data Transfer
Source Server : LOCALHOST
Source Server Version : 50520
Source Host : localhost:3306
Source Database : banager
Target Server Type : MYSQL
Target Server Version : 50520
File Encoding : 65001
Date: 2012-07-17 17:48:42
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... |
Activity 1:
(1):
create table DIM_item
(
id_item int primary key,
itemName char(20),
color char(10),
price real
);
create table DIM_time
(
id_time int primary key,
realDate char(8),
yearMonth char(8)
);
create table DIM_place
(
id_place int primary key,
shopName... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 22, 2017 at 03:14 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
BEGIN TRANSACTION
INSERT INTO Customers(cust_id, cust_name)
VALUES('1000000010', 'Toys Emporium')
SAVE TRANSACTION StartOrder
INSERT INTO Orders(order_num, order_date, cust_id)
VALUES(20100, '2001/12/1', '1000000010')
IF @@ERROR <> 0 ROLLBACK TRANSACTION StartOrder
INSERT INTO OrderItems(order_num, order_item, ... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 31, 2021 at 10:16 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
DROP TRIGGER IF EXISTS delete_child_comment; |
UPDATE dim_school SET city_id=3 WHERE id=19673;
UPDATE dim_school SET city_id=7 WHERE id=18007;
UPDATE dim_school SET city_id=27 WHERE id=18209;
UPDATE dim_school SET city_id=31 WHERE id=19282;
UPDATE dim_school SET city_id=35 WHERE id=18075;
UPDATE dim_school SET city_id=36 WHERE id=18346;
UPDATE dim_school SET city_i... |
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
ALTER TABLE event_users ADD CONSTRAINT unique_event_user_pair UNIQUE(event_id, user_id);
-- +goose Down
-- SQL section 'Down' is executed when this migration is rolled back
ALTER TABLE event_users DROP CONSTRAINT unique_event_user_pair;
|
------------------constraints-----------------------
--constraints are the different rules that we can place on our columns
----to restrict the input into our tables.
/*
* different constraints
* not null column cannot contain null values
* unique column cannot have duplicate values
* primary key combina... |
CREATE database todolist;
USE todolist;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECT... |
create table flnotes (
flnotes_id serial,
flnotes_flhead_id integer references flhead (flhead_id) on delete cascade,
flnotes_period_id integer references period (period_id) on delete cascade,
flnotes_notes text default '');
alter table flnotes add unique (flnotes_flhead_id, flnotes_period_id);
grant all on fl... |
DECLARE
v_stateConfig INTEGER;
v_res INTEGER;
BEGIN
:ErrorCode := 0;
:ErrorMessage := '';
v_stateConfig := :STATECONFIG;
v_res := f_stp_destroycasestatedetail(errorcode => :ErrorCode, errormessage => :ErrorMessage, stateconfig => v_stateConfig);
END; |
// 1) Find the h-indexes of the authors in your graph (see
// https://en.wikipedia.org/wiki/H-index, for a definition of the h-index metric).
MATCH (au:Author)<-[:Written_By]-(ar1:Article)<-[:Cites]-(ar2:Article)
WITH au.author as Author, ar1.title as Article, count(ar2) as Citations
ORDER BY Citations DESC
WITH Auth... |
alter table DocSecCategoryCusSearch add isCond char(1) default '0'
/
alter table DocSecCategoryCusSearch add condColumnWidth integer default 1
/
update DocSecCategoryCusSearch set isCond = '0'
/
update DocSecCategoryCusSearch set condColumnWidth=1
/
|
USE tienda;
SHOW TABLES;
SELECT * FROM puesto;
SELECT * FROM empleado;
SELECT * FROM venta;
SELECT * FROM articulo;
# ¿Cuál es el nombre de los empleados cuyo sueldo es menor a $10,000?
SELECT nombre FROM empleado WHERE id_puesto IN
(SELECT id_puesto FROM puesto WHERE salario < 10000);
# ¿Cuál es la cantidad mínima y... |
-- Scrip that lists all databases
-- of your MySQL server
SHOW DATABASES;
|
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 02, 2019 at 09:37 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
select c_city, s_city, d_year, sum(lo_revenue) as revenue
from customer, lineorder, supplier, ddate
where lo_custkey = c_custkey
and lo_suppkey = s_suppkey
and lo_orderdate = d_datekey
and c_nation = 'UNITED STATES'
and s_nation = 'UNITED STATES'
and d_year >= 1992 and d_year <= 1997
group by c_city, s_city, d_year
ord... |
with exameGenero as (
select p.ic_sexo, e.de_exame, COUNT(*) as conta from pacientes p JOIN exames e
on p.id_paciente = e.id_paciente
group by rollup(p.ic_sexo, e.de_exame)
)
select* from exameGenero
where conta between 10 and 20
order by 3 desc; |
CREATE TABLE public.categorias_costos_logisticos
(
id bigint,
nombre character varying(100)
)
WITH (
OIDS = FALSE
)
;
CREATE SEQUENCE public.categorias_costos_id_seq
INCREMENT 1
START 1
MINVALUE 1;
CREATE TABLE public.item_costo_logistico
(
id bigint,
nombre character ... |
-- -----------------------------------------------------
-- Schema oquiz
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Table "levels"
-- -----------------------------------------------------
DROP TABLE IF EXISTS "levels" ;
CREATE TABLE IF NOT EXIS... |
ALTER TABLE incarnation CHANGE image_url information_url VARCHAR(255);
|
-- schema.sql
drop database if exists webapp;
create database webapp;
use webapp;
create user 'webapp'@'localhost' identified by 'webapp';
grant select, insert, update, delete on webapp.* to 'webapp'@'localhost' with grant option;
/*
grant select, insert, update, delete on webapp.* to 'webapp'@'localhost' identifi... |
drop table IF EXISTS cards;
drop table IF EXISTS customers;
drop table IF EXISTS users;
drop table IF EXISTS settings;
drop table IF EXISTS rules;
drop table IF EXISTS holidays;
drop table IF EXISTS operations;
create table IF NOT EXISTS users
(
name varchar(255) not null primary key,
password varchar(... |
CREATE PROCEDURE [Enhabit].[GetUser]
@UserId uniqueidentifier
AS
BEGIN
SET NOCOUNT ON;
SELECT
Username,
FirstName,
LastName,
Email,
PhoneNumber,
AccountTypeId
FROM Enhabit.Users
WHERE UserId = @UserId
END
|
CREATE DATABASE Asignacion_de_Materiales;
USE Asignacion_de_Materiales;
CREATE TABLE `material` (
`idMaterial` INTEGER(5) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,
`nombre` VARCHAR(100) DEFAULT NULL,
`existencia` INTEGER(5) DEFAULT NULL,
UNIQUE (nombre),
PRIMARY KEY (`idMaterial`))
ENGINE ... |
CREATE FUNCTION [Transform].[fnRegexFind]
(@expressionToFind NVARCHAR (MAX) NULL, @expressionToSearch NVARCHAR (MAX) NULL, @instanceToReturn INT NULL)
RETURNS NVARCHAR (4000)
AS
EXTERNAL NAME [EDWDb].[UserDefinedFunctions].[fnRegexFind]
|
# Write your MySQL query statement below
#MYSQL 版本
SELECT DISTINCT A.NUM AS ConsecutiveNums FROM LOGS AS A
WHERE A.NUM = (
SELECT B.NUM FROM LOGS AS B
WHERE B.ID = A.ID+1 AND B.NUM = (
SELECT C.NUM FROM LOGS AS C
WHERE C.ID=B.ID+1
)
);
/* Write your T-SQL query statement below */
/* MS sql... |
CREATE TABLE [Mgmt].[Config_PipelineController](
[PipelineControllerId] int IDENTITY(1,1) NOT NULL,
[MasterPipelineId] int NOT NULL,
[ChildPipelineId] int not null,
[IsEnabled] BIT not null,
[ExecutionOrder] int not null,
CONSTRAINT [PK_PipelineController_PipelineControllerId] PRIMARY KEY CLUSTERED (Pipeline... |
SELECT
note
FROM
notation
WHERE note IS NULL |
-- Script that 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.show_id IS NULL
ORDER BY tv_shows.title, tv_show_genres.genre_id;
|
INSERT INTO `lang` (`id`, `name`) VALUES
(1, 'cs'),
(2, 'en');
INSERT INTO `academic_position` (`id`, `start_year`, `end_year`, `position_name`, `university`, `department`, `langId`) VALUES
(1, '2004', '2005', 'General Atlantic Professor', 'Stanford University', 'Graduate School of Business', 1),
(2, '2004', '2005',... |
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 31-10-2016 a las 00:07:06
-- 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_CHARACTER_SET_CLIENT=@@CHARAC... |
alter table CUBAMAPEXAMPLE_SALES_ORDER add column SALES_PERSON_ID varchar(36) ;
|
-- Deliverable 1: the number of retiring employees by title
SELECT e.emp_no,
e.first_name,
e.last_name,
ti.title,
ti.from_date,
ti.to_date
INTO retirement_titles
FROM employees AS E
INNER JOIN titles AS ti
ON e.emp_no = ti.emp_no
WHERE e.birth_date BETWEEN '1952-01-01' AND '1955-01-01'
ORDER BY e.emp_no;
-- Use... |
CREATE UNIQUE INDEX username ON users(username); |
CREATE TABLE track(
track_title varchar(100) primary key,
length_of_track varchar(5) not null,
release_date date,
genre varchar(20) not null
);
CREATE TABLE product(
product_id int primary key auto_increment,
media varchar(6) not null,
price numeric(10,6) not null,
product_title varchar(100),
... |
CREATE TRIGGER TR_DeleteStrategy
ON Strategies
INSTEAD OF DELETE
AS UPDATE Strategies SET Active = '0' WHERE Id = (SELECT Id FROM deleted) |
/* Create Tables */
CREATE TABLE "ADM_TROLE"
(
"ROLE_ROLE" NUMBER(38) NOT NULL, -- ID de la tabla perfiles
"ROLE_NOMB" VARCHAR2(50) NULL, -- Nombre del perfil
"ROLE_ESTA" VARCHAR2(1) NULL, -- Estado del perfil
"ROLE_CREA" NUMBER(38) NULL, -- ID DEL USUARIO QUE CREA EL PERFIL
"ROLE_UPDA" NUMBER(38) ... |
delete from HtmlLabelIndex where id=20903
/
delete from HtmlLabelInfo where indexid=20903
/
INSERT INTO HtmlLabelIndex values(20903,'确定删除该项目模板吗?')
/
INSERT INTO HtmlLabelInfo VALUES(20903,'确定删除该项目模板吗?',7)
/
INSERT INTO HtmlLabelInfo VALUES(20903,'Are you sure you want to delete it',8)
/ |
CREATE DATABASE IF NOT EXISTS `xeviousvs` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `xeviousvs`;
-- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: xeviousvs
-- ------------------------------------------------------
-- Server version 5.6.21
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
DELETE FROM `wp_model` WHERE `name`='stores' ORDER BY id DESC LIMIT 1;
DROP TABLE IF EXISTS `wp_stores`;
DELETE FROM `wp_model` WHERE `name`='shop_user_level_link' ORDER BY id DESC LIMIT 1;
DROP TABLE IF EXISTS `wp_shop_user_level_link`;
DELETE FROM `wp_model` WHERE `name`='stores_link' ORDER BY id DESC LIM... |
INSERT INTO reporting.zstg_AFR_Normal(
`lead_id`,
`nc_lms_accepts`,
`rc_lms_accepts`,
`is_returning`,
`is_unique_accepts`,
`is_unique_requests`,
`is_express`,
`is_overnight_lead`,
`is_external_nc`,
`rc_external`,
`is_epic_rc`,
`channel`,
`is... |
create or replace PACKAGE BODY PK_TE AS
/**
* The package that provides functions to substitute values instead of placeholders.<br/>
* Only functions and types that are to be called by end user are exposed. Some supporting functions are moved to PK_TE_IMPL.
* @headcom
*/
g_old_syntax_proxy ty_te_old_proxy;
g_twig... |
/*******************************************************************************
* File Name: cyfittergnu.inc
*
* PSoC Creator 4.2
*
* Description:
*
* This file is automatically generated by PSoC Creator.
*
********************************************************************************
* Copyright (c) 2007-2018 Cy... |
SET NAMES UTF8;
DROP DATABASE IF EXISTS taobao;
CREATAE DATABASE taobao CHARSET=UTF8;
USE taobao;
CREATE TABLE product(
pid INT PRIMARY KEY AUTO_INCREMENT,
pconent VARCHAR(32)
);
INSERT INTO product VALUES
(NULL,'dhddjdjjj'),
$_REQUEST['ID'] OR DIE("ID REQUIRED")
$conn=mysqli_connect('127.0.0.1','root','','taobao',3306... |
DECLARE
v_id NUMBER;
v_name NVARCHAR2(255);
v_code NVARCHAR2(255);
v_description NCLOB;
---
v_errorcode NUMBER;
v_errormessage NVARCHAR2(255);
BEGIN
v_id := :Id;
v_name := :Name;
v_code := :Code;
v_description := ... |
-- 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... |
drop database if exists HotelReservation;
create database HotelReservation;
use HotelReservation;
Create Table Guests (
GuestId int primary key auto_increment,
FirstName varchar(75) Not Null,
LastName varchar(75) Not Null,
Address varchar(75) Not Null,
City varchar(75) Not Null,
Phon... |
SELECT COUNT(*) FROM USER_NOTIFICATIONS
WHERE DELETE_FLAG = 0;
|
--insert into services (name , image , description) values
--( 'Logo Design' ,
-- 'https://drive.google.com/file/d/1o9tcnqIrBu0SIr_J_Bbau43jsbRaPiHI/view?usp=sharing' ,
-- 'Redefining the purpose of logo design' )
--
--insert into plans (color , features , name ,price , "serviceId") values
--( '#92fff9',array ['2 Uniqu... |
INSERT INTO USER_ROLES (ROLE_ID, ROLE_NAME) VALUES (1, 'CLIENT');
INSERT INTO USER_ROLES (ROLE_ID, ROLE_NAME) VALUES (2, 'EMPLOYEE');
INSERT INTO USER_ROLES (ROLE_ID, ROLE_NAME) VALUES (3, 'ADMIN');
|
select name
from customers
where state like 'RS'
|
CREATE OR REPLACE TABLE `<プロジェクトID>.automl_tables_data.noaa_gsod_train`
(
observation_date DATE
, temp_mean_c FLOAT64
, lag1_temp_moving_avg FLOAT64
, lag1_prcp_moving_avg FLOAT64
, lag1_wdsp_moving_avg FLOAT64
, diff2_temp_moving_avg FLOAT64
, diff2_prcp_moving_avg FLOAT64
, diff2_wdsp_moving_avg... |
CREATE TABLE POLL_AUDIT
(
POLL_NAME VARCHAR(64) PRIMARY KEY,
NEXT_RUN_TIME TIMESTAMP,
NUMBER_OF_RECORDS INT
);
GRANT SELECT, INSERT, UPDATE, DELETE ON POLL_AUDIT TO offender_events;
|
#Replace " with ``
USE Yago;
UPDATE labels
SET NAME = REPLACE(NAME, '"', '``')
WHERE ID > 0;
UPDATE labels
SET LABEL = REPLACE(LABEL, '"', '``')
WHERE ID > 0;
UPDATE facts
SET SUBJECT = REPLACE(SUBJECT, '"', '``')
WHERE ID > 0;
UPDATE facts
SET OBJECT = REPLACE(OBJECT, '"', '``')
WHERE ID > 0; |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 03, 2020 at 04:19 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
alter table workflow_flownode add vtintervenor char(1)
/
update workflow_flownode set vtintervenor='1' where viewtypeall='1'
/
|
CREATE or REPLACE PROCEDURE DocShare_Delete
( id_1 integer,
flag out integer,
msg out varchar2,
thecursor IN OUT cursor_define.weavercursor)
as
begin
delete from DocShare where id= id_1;
end;
/ |
/* Create Tables */
CREATE TABLE "ADM_TACCI"
(
"ACCI_ACCI" NUMBER(38) NOT NULL, -- ID DE LA TABLA ACCESO
"ACCI_NOMB" VARCHAR2(1) NULL, -- NOMBRE DE LA ACCIÓN
"ACCI_DESC" VARCHAR2(1) NULL, -- DESCRIPCIÓN DE LA ACCIÓN
"ACCI_CREA" NUMBER(38) NULL, -- ID DEL CREADOR DEL REGISTRO
"ACCI_UPDA" NUMBER(38) N... |
# generated via Exemples/minimal.xml;
DROP TABLE IF EXISTS minimal_id_poids;
CREATE TABLE minimal_id_poids (
id VARCHAR(255) ,
poids VARCHAR(255) ,
PRIMARY KEY (`id`)
) ;
INSERT INTO minimal_id_poids (id,poids) VALUES ('MAT0001',62) ;
INSERT INTO minimal_id_poids (id,poids) VALUES ('MAT0002',174) ;
I... |
DROP DATABASE IF EXISTS superpersonsightingsdbtest;
CREATE DATABASE superpersonsightingsdbtest;
USE superpersonsightingsdbtest;
CREATE TABLE superpower(
superpowerId INT NOT NULL AUTO_INCREMENT,
superpowerName VARCHAR(50) NOT NULL,
CONSTRAINT pk_superpower PRIMARY KEY (superpowerId)
);
CREATE TABLE supertyp... |
create database bdsistemas;
use bdsistemas;
CREATE TABLE noticias (
id smallint(5) unsigned NOT NULL auto_increment,
titulo varchar(100) NOT NULL default '',
texto text NOT NULL,
categoria enum('promociones','ofertas','costas') NOT NULL default 'promociones',
fecha date NOT NULL default '0000-00-00... |
SELECT SUM(l_extendedprice * l_discount) FROM lineitem WHERE l_discount < 0.07 AND l_quantity < 24 |
create table if not exists event_job
(
`instance` varchar(100) not null default '',
`group` varchar (100) not null default '',
`name` varchar(100) not null default '',
`event` varchar(100) not null default '',
`timezone` varchar(6) not null default '',
`descrip... |
-- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64)
--
-- Host: localhost Database: ssubob
-- ------------------------------------------------------
-- Server version 8.0.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... |
select round(100 * sum(order_date = customer_pref_delivery_date) / count(*), 2) as immediate_percentage from Delivery;
///
SELECT ROUND(100*AVG(order_date = customer_pref_delivery_date), 2) AS immediate_percentage
FROM Delivery;
///
select
round(
(select count(*) from delivery where order_date = customer_pref_... |
-- phpMyAdmin SQL Dump
-- version 4.6.0
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Mer 27 Avril 2016 à 01:46
-- Version du serveur : 5.7.9
-- Version de PHP : 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... |
delete from HtmlLabelIndex where id=21999
/
delete from HtmlLabelInfo where indexid=21999
/
INSERT INTO HtmlLabelIndex values(21999,'此名称已经存在,请换用别的名称')
/
INSERT INTO HtmlLabelInfo VALUES(21999,'此名称已经存在,请换用别的名称',7)
/
INSERT INTO HtmlLabelInfo VALUES(21999,'This name already exists, please use the other name for',8)
... |
SET search_path TO {0[0]};
SELECT
*
FROM
jobs
WHERE
jobname = '{0[1]}'
; |
create database aiblockchain;
use aiblockchain;
create table users(id int(10),name varchar(40),age int(3));
CREATE TABLE `users` (
`id` int(10) DEFAULT NULL,
`name` varchar(40) DEFAULT NULL,
`age` int(3) DEFAULT NULL,
`created_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
CREATE TABLE accounts (
GUID varchar(255) PRIMARY KEY,
username VARCHAR(65) UNIQUE NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
salt VARCHAR(255),
token VARCHAR(255),
date_ban_end DATETIME,
last_logged_in DATETIME,
created_at DATETIME DEFAULT CURRENT_... |
/*Extrahieren von T adn T je Agent, aufgeteilt nach Trips, 20% Test, 80% Training */
/* Kiel-Gdynia:
Agent 1: 12.26, Percentile ~32% (Kiel bis Rostock)
Agent 2: 14.6, Percentile ~64% (Rostock bis Bornholm/Polnische Grenze)
Agent 3: 19.65 Percentile 100 (Bornholm/Polnische Grenze bis Gdynia) */
SET @LeftBorder = 10.1;... |
DROP TABLE movies;
DROP TABLE people;
CREATE TABLE movies (
id SERIAL PRIMARY KEY,
title VARCHAR(255),
year INT,
show_time VARCHAR(255)
);
CREATE TABLE people (
id SERIAL PRIMARY KEY,
name VARCHAR(255)
);
INSERT INTO people (name) VALUES ('Homer Simpson');
INSERT INTO people (name) VALUES ('Marge Simpson');
IN... |
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 28, 2014 at 10:21 AM
-- Server version: 5.5.24-log
-- PHP Version: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.