text stringlengths 6 9.38M |
|---|
-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tempo de Geração: Jul 03, 2013 as 04:09
-- Versão do Servidor: 5.1.41
-- Versão do PHP: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CH... |
DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products(
id INTEGER(9) NOT NULL AUTO_INCREMENT,
product_name VARCHAR(30) NOT NULL,
department_name VARCHAR(30) NOT NULL,
price DECIMAL(3,2) NOT NULL,
stock_quantity INTEGER(30) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO products (produ... |
-- ロケール毎のメールテンプレート
drop table if exists MAIL_LOCALE_TEMPLATES cascade;
create table MAIL_LOCALE_TEMPLATES (
TEMPLATE_ID character varying(32) not null
, KEY character varying(12) not null
, TITLE text not null
, CONTENT text
, INSERT_USER integer
, INSERT_DATETIME timestamp
, UPDATE_USER integer
, UPDA... |
USE boardgamer;
INSERT INTO categories VALUES
(1,'Экономика','Зарабатываем деньги, развиваем экономику'),
(2,'Научная фантастика','Атмосфера научной фантастики'),
(3,'Строительство','Строим'),
(4,'Миниатюры','Игры с миньками'),
(5,'Кооператив','Игры с кооперативным режимом'),
(6,'Кубики','Игры с большим ... |
--Code to load data to final.apcd_claim_ccw table
--Person-level CCW condition status by time period
--Eli Kern (PHSKC-APDE)
--2019-5-17
------------------
--STEP 1: Insert data that has passed QA in stage schema table
-------------------
insert into PHClaims.final.apcd_claim_ccw with (tablock)
select
id_apcd,
from_dat... |
-- DROP VIEW IF EXISTS mm_last_levels#
-- CREATE VIEW mm_last_levels AS
-- SELECT
-- lu.PROVIDER_NAME AS PARTNER_ID, lu.EXTERNAL_ID AS EXTERNAL_ID,p.USER_ID AS USER_ID,p.LEVEL AS LEVEL,lp.LAST_PLAYED AS LAST_PLAYED
-- FROM
-- LAST_PLAYED lp
-- JOIN strataprod.PLAYER p
-- JOIN strataprod.LOBBY_USER lu
-- WHERE
-... |
--If a DB named "bamazon" already exists, it will be deleted.
DROP DATABASE IF EXISTS bamazon;
--Now, a new DB "bamazon" will be created and selected.
CREATE DATABASE bamazon;
USE bamazon;
--A table "products" will be created within the DB "bamazon".
CREATE TABLE products (
item_id INTEGER NOT NULL auto_increment... |
SELECT n.caption AS [Device], n.DetailsURL AS [_LinkFor_Device]
,'/Orion/images/StatusIcons/Small-' + StatusIcon AS [_IconFor_Device]
, ae.accountid AS [By]
, Alerts.SuppressFrom AS [Mute from], Alerts.SuppressUntil AS [Mute Until]
FROM Orion.AlertSuppression AlertS
JOIN Orion.nodes n ON n.uri = AlertS.EntityU... |
create procedure [sp_MSins_SalesStoreOrderStats]
@c1 int,
@c2 char(1),
@c3 tinyint,
@c4 int,
@c5 int,
@c6 tinyint,
@c7 money
as
begin
insert into [Sales].[StoreOrderStats] (
[BusinessEntityID],
[OrderFrequency],
[OrderMonth],
[FirstOrderYear],
[LastOrderYear],
[MinPaymentType... |
CREATE DATABASE ajs;
USE ajs;
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`uuid` varchar(36) NOT NULL,
`name` varchar(45) DEFAULT NULL,
`subject` varchar(45) DEFAULT NULL,
PRIMARY KEY (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SELECT * FROM user; |
SELECT Id, ProductName, ProductDesc
FROM Products
where ProductName like 'S%'
Order by ProductName Desc |
--Query 1: Customer ratings changed overtime:
--Uses inner join from customer’s details to stream data
--Query gives us an overall picture of the fluctuations in customer ratings
--It also helps in making strategic decisions about the future content depending on the most liked or vi... |
SELECT (title) FROM books WHERE publisher = 1; |
-- Populate a table with estimated population by interpolating census population
-- across other geometries: Municipality, Comm. Area, Ward
CREATE TABLE population (area_name varchar(100), area_type varchar(50), pop integer);
INSERT INTO population
SELECT m.name, 'Municipality',
SUM(p.pop*st_area(st_intersecti... |
INSERT INTO burgers (burger_name, devoured) VALUES ("Bacon Cheese Burger", false);
INSERT INTO burgers (burger_name, devoured) VALUES ("Pizza Burger", false);
INSERT INTO burgers (burger_name, devoured) VALUES ("BBQ Burger", false); |
DROP PROCEDURE IF EXISTS getBlogs;
DELIMITER $$
CREATE PROCEDURE getBlogs(
IN pc_idUser INTEGER,
OUT pcMensaje VARCHAR(2000),
OUT pbOcurreError BOOLEAN
)
BEGIN
DECLARE temMensaje VARCHAR(1000);
DECLARE vn_existeUsuario INTEGER DEFAULT 0;
SET pbOcurreError :=TRUE;
SET pcMensaje :='';
/*Comproband... |
select pointID, describe
from pointofinterest
where closetime >='8PM'
order by pointID; |
CREATE TABLE `users` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`expired_time` INTEGER NULL DEFAULT NULL);
INSERT INTO `users` DEFAULT VALUES; |
ALTER TABLE vedtaksbrev
ADD COLUMN enhet VARCHAR; |
/*
Navicat Premium Data Transfer
Source Server : 101.200.59.185
Source Server Type : MySQL
Source Server Version : 50715
Source Host : rm-2ze3133i953z12wndo.mysql.rds.aliyuncs.com
Source Database : onecode
Target Server Type : MySQL
Target Server Version : 50715
File Encoding ... |
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50639
Source Host : localhost:3306
Source Database : link
Target Server Type : MYSQL
Target Server Version : 50639
File Encoding : 65001
Date: 2018-08-30 14:14:41
*/
SET FOREIGN_KEY_CHECKS=0;
-- --------... |
alter table mailresourcefile add signid int
/
|
drop table if exists opensaga.saga;
|
REM update.sql
REM Version 1.0, last updated 8/8/97
REM This script demonstrates using UPDATE with object types, as described in
REM Chapter 11 of _Oracle8 PL/SQL Programming_ by Scott Urman.
DECLARE
v_NewRoom RoomObj :=
RoomObj(99990, 'Building 7', 200, 50, 'Discussion Room F');
v_RoomRef REF RoomObj;... |
SELECT * FROM TEMPLATE_ITEMS
WHERE DELETE_FLAG = 0
ORDER BY INSERT_DATETIME %s
LIMIT ? OFFSET ?;
|
update workflow_billfunctionlist set indShowChart=1 where billid=19
/ |
ALTER TABLE facebook_page_to_scrap
DROP COLUMN IF EXISTS enabled;
ALTER TABLE facebook_page_to_scrap
ADD COLUMN enabled BOOL NOT NULL DEFAULT TRUE;
ALTER TABLE vk_page
DROP COLUMN IF EXISTS enabled;
ALTER TABLE vk_page
ADD COLUMN enabled BOOL NOT NULL DEFAULT TRUE; |
select first_name,last_name,length(first_name||last_name) from employees |
INSERT INTO USERS VALUES (1004, 'Dallin', 'Coolbanks', 'neato@g-unit.com', PHONE_NUM_TYPE('801', '223342'),
ADDRESS_TYPE('1234 Neat St', 'Alpine', 'UT', '84004'), TO_DATE('1999-10-10', 'YYYY-MM-DD'));
INSERT INTO USERS VALUES (1006, 'Geraldine', 'Fastcars', 'jackson4@tbone.com', PHONE_NUM_TYPE... |
create table category (
id int primary key auto_increment,
name varchar(250),
attr varchar(250)
);
create table post (
id int primary key auto_increment,
sent varchar(250),
category int,
favorite int default 0,
surprise int default 0,
client_time timestamp default current_timestamp,
foreign key (ca... |
SELECT * FROM WEBHOOKS
WHERE
WEBHOOK_ID = ?
;
|
CREATE TABLE IF NOT EXISTS `ims_superdesk_shop_member_invoice` (
`id` int(11) NOT NULL,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`realname` varchar(20) DEFAULT '' COMMENT '个人发票抬头',
`invoiceState` int(11) DEFAULT 1 COMMENT '开票方式(1为随货开票,0为订单预借,2为集中开票 )',
`invoiceType` int(4) DEFA... |
--update RoomDetails set roomRate = 15000 where roomNo = 3;
declare
v_roomType RoomDetails.roomType%TYPE;
v_review RoomDetails.review%TYPE;
begin
select roomType,review into v_roomType , v_review
from RoomDetails1 @site_link1
where roomNo = 3;
insert into RoomDetails2 @site_link2 values (3, v_roomType, 14000, v_rev... |
CREATE TABLE customer (
id integer PRIMARY KEY,
company varchar(40),
street varchar(40),
plz integer,
city varchar(40)
);
CREATE TABLE bill (
id integer PRIMARY KEY,
customer_id integer REFERENCES customer(id),
date date,
number integer
);
CREATE TABLE billing_position (
id integer PRIMARY KEY,
... |
SELECT rm.ID as returnmessage_id,
rm.MctAddress,
rm.MacroNumber,
m.nome as MacroName,
rm.PositionTime,
rm.jornada_id
FROM exporta.returnmessage rm
inner join macro m on (rm.MacroNumber = m.codigo)
order by MctAddress asc, PositionTime asc;
-- 2533
select count(j.id) as total_jornadas
from jor... |
create database CodeFighterGame;
use CodeFighterGame;
create table USER_DETAILS (uniqueID varchar(100), FirstName varchar(100), LastName varchar(100),
EmailID varchar(100), UserName varchar(100), Password varchar(100));
create table Game_History (uniqueID varchar(100), FirstName varchar(100), LastName varchar(100), ... |
CREATE TABLE COUNTRIES (
COUNTRY_ID VARCHAR(2) PRIMARY KEY NOT NULL ,
COUNTRY_NAME VARCHAR(40),
REGION_ID int
) |
declare
v_CREATED_END date;
v_CREATED_START date;
v_CalcEmail nvarchar2(255);
v_CalcExtSysId nvarchar2(255);
v_CalcName nvarchar2(255);
v_CaseId nvarchar2(255);
v_CaseSysTypeIds nvarchar2(255);
v_CaseSysType_Code nvarchar2(255);
v_Case_Id Integer;
v_CaseworkerIds nvarchar2(255);
v_DESCRIPTION nvar... |
--
-- PostgreSQL database dump
--
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name:... |
-- Дамп структуры базы данных car_rental
CREATE DATABASE IF NOT EXISTS `car_rental` /*!40100 DEFAULT CHARACTER SET utf16 */;
USE `car_rental`;
CREATE DATABASE IF NOT EXISTS `car_rental_tracking` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `car_rental_tracking`;
|
create or replace PROCEDURE VALIDATE_ACC_INVPARTY_SP
(
prevSRN IN VARCHAR2,
isInvParty IN VARCHAR2,
isAcc IN VARCHAR2,
accNum IN VARCHAR2,
isIBAN IN VARCHAR2,
status_val OUT VARCHAR2
)
AS
srvc_typ_cd VARCHAR2(50);
isBlock VARCHAR2(2);
isGarnish VARCHAR2(2);
agcy_srvc_... |
create database database375e;
|
--
-- To reload the database:
-- $ mysql -u root -p < ngx_hawk_dm.sql
--
set session storage_engine = "InnoDB";
set session time_zone = "+0:00";
drop database if exists ngx_hawk;
create database ngx_hawk default character set utf8 default collate utf8_general_ci;
grant all privileges on ngx_hawk.* TO 'ngx_hawk'@'lo... |
create database mjv_db;
CREATE TABLE tab_cliente (
codigo serial NOT null PRIMARY KEY,
pf_pj char(1) NOT NULL,
razao_social_nome varchar (50) NOT NULL,
cpf_cnpj varchar (14) NOT null,
telefone1 numeric (11) NOT NULL,
telefone2 numeric (11) NULL,
email varchar (70) NOT NULL,
atividade_prof varchar (30) NOT... |
/*
Navicat Premium Data Transfer
Source Server : 116.85.32.107
Source Server Type : MySQL
Source Server Version : 50641
Source Host : 116.85.32.107:3306
Source Schema : sky
Target Server Type : MySQL
Target Server Version : 50641
File Encoding : 65001
Date: 18/08/201... |
USE rap_db;
-- 缓存优化,智能判断接口是否应用缓存
ALTER TABLE tb_action
ADD COLUMN disable_cache TINYINT NOT NULL
DEFAULT 0;
-- 默认先全部disable_cache
UPDATE tb_action SET disable_cache = 1
WHERE id != 0 |
alter table t_msg_wx_cp
add btn_txt text;
alter table t_msg_mail
add Cc text; |
describe plantilla;
update plantilla set nombre = 'Luis'
where dni = '12345678';
select * from plantilla;
commit;
exit;
|
-- Refugee Database
--
-- Tables to create
-- User, user_m to refugee association table
-- Report
-- ngo
-- User
DROP TABLE IF EXISTS user_m CASCADE;
DROP TABLE IF EXISTS ngo CASCADE;
DROP TABLE IF EXISTS refugee CASCADE;
DROP TABLE IF EXISTS associated_person;
DROP TABLE IF EXISTS refugee_ngo;
DROP TABLE IF EXISTS re... |
CREATE TABLE IF NOT EXISTS `wp_signin_log` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`score` int(10) NOT NULL COMMENT '积分',
`wpid` varchar(255) NOT NULL COMMENT 'wpid',
`sTime` int(10) UNSIGNED NOT NULL COMMENT '签到时间',
`uid` varchar(255) NOT NULL COMMENT '用户ID',
PRIMARY KEY (`id`)
) E... |
CREATE TABLE ParameterDeductions(
ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
Parameter_name varchar(25) NOT NULL,
Parameter_value float NOT NULL,
Parameter_status INT DEFAULT 1 NOT NULL
)
|
insert into salt (id, salt, password_id) values (8001, 'KbTaYN', 8001);
insert into salt (id, salt, password_id) values (8002, 's8PuoGovCFs', 8002);
insert into salt (id, salt, password_id) values (8003, 'uz9Bk1BqiH9z', 8003);
insert into salt (id, salt, password_id) values (8004, 'p3at8TkHF', 8004);
insert into salt (... |
SELECT *
FROM facts f
INNER JOIN attributes a ON(a.id = f.attribute_id)
INNER JOIN securities s ON(s.id = f.security_id)
WHERE a.name = 'eps'
AND s.symbol = 'CDE';
SELECT *
FROM facts f
INNER JOIN attributes a ON(a.id = f.attribute_id)
INNER JOIN securities s ON(s.id = f.security_id)
WHERE a.n... |
ALTER TYPE sht.payout_summary_operation_type ADD VALUE 'chargeback';
|
-- begin LANCASTERPETCLINIC_TREATMENT_ROOM
create table LANCASTERPETCLINIC_TREATMENT_ROOM (
ID varchar(36) not null,
VERSION integer not null,
CREATE_TS timestamp,
CREATED_BY varchar(50),
UPDATE_TS timestamp,
UPDATED_BY varchar(50),
DELETE_TS timestamp,
DELETED_BY varchar(50),
NAME v... |
SELECT book.title
FROM book
LEFT JOIN checkout_item
ON book.id = checkout_item.book_id
WHERE checkout_item.book_id IS NULL;
SELECT movie.title
FROM movie
LEFT JOIN checkout_item
ON movie.id = checkout_item.movie_id
WHERE checkout_item.movie_id IS NULL;
|
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50051
Source Host : localhost:3306
Source Database : pea
Target Server Type : MYSQL
Target Server Version : 50051
File Encoding : 65001
Date: 2018-03-03 21:57:10
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... |
CREATE TABLE IF NOT EXISTS users(
id SERIAL PRIMARY KEY,
username VARCHAR(255) NOT NULL,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL
);
CREATE TABLE IF NOT EXISTS boards(
id SERIAL PRIMARY KEY,
creator IN... |
declare
type strings is table of varchar(160);
commands strings;
cmd varchar(160);
begin
--
select cmd
bulk collect into commands
from
(
select 'drop sequence "'||sequence_name||'"' as cmd,
1 as ord, 0 as rnum
from user_sequences
union all
select 'drop type "'||type_name||'"... |
-- Data Insertion --
-- Location data --
insert into location values("L01", "Chennai");
insert into location values("L02", "Bangalore");
insert into location values("L03", "Hyderabad");
insert into location values("L04", "Kochi");
insert into location values("L05", "Mumbai");
-- Category... |
CREATE USER postgres;
ALTER USER postgres WITH SUPERUSER;
|
CREATE TABLE statssearch (
id CHAVE NOT NULL,
id_shop CHAVE NOT NULL,
id_shop_group CHAVE NOT NULL,
keywords CHARACTER VARYING(255) NOT NULL,
results INTEGER NOT NULL,
date_add TIMESTAMP WITH TIME ZO... |
-- phpMyAdmin SQL Dump
-- version 2.11.6-rc1
-- http://www.phpmyadmin.net
--
-- Host: 188.130.180.22
-- Generation Time: Feb 16, 2012 at 02:08 PM
-- Server version: 5.5.1
-- PHP Version: 5.2.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_C... |
insert into tb_goods values
(default, '乐事(Lay’s)无限薯片', 8.2, 'images/lay.jpg'),
(default, '旺旺 仙贝 加量装 540g', 18.5, 'images/wang.jpg'),
(default, '多儿比(Dolbee)黄桃水果罐头', 6.8, 'images/dolbee.jpg'),
(default, '王致和 精制料酒 500ml', 7.9, 'images/wine.jpg'),
(default, '陈克明 面条 鸡蛋龙须挂面', 1.0, 'images/noodle.jpg'),
(default, '鲁花 菜籽油 4L'... |
insert customer values('1', 'Kiwook', 'Kwon');
insert customer values('2', 'Eric', 'Asch');
insert customer values('3', 'Timothy', 'Hayduk');
insert customer values('4', 'Kushal', 'Tiwari');
insert products values('11', 'CD');
insert products values('12', 'DVD');
insert products values('13', 'DigitalDownload');
inser... |
CREATE DATABASE pmf;
USE pmf;
CREATE TABLE "Etufor".cards
(
id integer NOT NULL,
CONSTRAINT cards_pkey PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
);
ALTER TABLE "Etufor".cards
OWNER TO postgres;
CREATE TABLE "Etufor".cards_has_categorys
(
id_category_cards integer,
id_cards integer,
CONSTRAINT cards_has_ca... |
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 20, 2017 at 03:29 AM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
DROP TABLE IF EXISTS weathers;
DROP TABLE IF EXISTS yelps;
DROP TABLE IF EXISTS movies;
DROP TABLE IF EXISTS meetups;
DROP TABLE IF EXISTS trails;
DROP TABLE IF EXISTS locations;
CREATE TABLE locations (
id SERIAL PRIMARY KEY,
search_query VARCHAR(255),
formatted_query VARCHAR(255),
latitude NUMERIC ... |
CREATE DATABASE IF NOT EXISTS `free_way` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `free_way`;
-- MySQL dump 10.13 Distrib 5.6.17, for Win64 (x86_64)
--
-- Host: localhost Database: free_way
-- ------------------------------------------------------
-- Server version 5.6.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... |
SELECT
e.aap_id as codigo_essa,
a.aap_id as codigo_isag,
a.esta_id as isag_estado,
e.aap_apoyo as essa_apoyo,
a.aap_apoyo as isag_apoyo,
CASE WHEN e.aap_apoyo=a.aap_apoyo THEN '-'
ELSE '1'
END AS DIFIERE,
e.aap_direccion as essa_direccion,
a.aap_direccion as isag_direccion,
e.aap_barrio as essa_barrio,
b.barr_d... |
--Does a businesses city, meaningfully affect its star rating?--
SELECT
city,
AVG(stars),
--This is the formula for the chi_squared test
--It is important to note that SQL doesn't let you use SUM(AVG(stars)), so I used the COUNT(city) to
--calulcuate this sum.
(SUM(stars*stars)+COUNT(city)*AVG(stars)*AVG... |
INSERT INTO workflow_browserurl (id,labelid,fielddbtype,browserurl,tablename,columname,keycolumname,linkurl) VALUES ( 164,141,'int','/systeminfo/BrowserMain.jsp?url=/hrm/company/SubcompanyBrowser.jsp','Hrmsubcompany','subcompanyname','id','/hrm/company/HrmSubCompanyDsp.jsp?id=')
/
create or replace PROCEDURE HrmResour... |
select * from barang;
select * from transaksi;
--select distinct waktu_transaksi, id_barang
--from transaksi
--where waktu_transaksi in (select waktu_transaksi
--from transaksi);
select waktu_transaksi as w, transaksi.id_barang as id, barang.nama_barang as n,
sum(transaksi.jumlah_transaksi) as j, count(transaksi... |
-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 19, 2017 at 06:22 PM
-- Server version: 5.1.41
-- PHP Version: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... |
ALTER TABLE sht.payment
ALTER COLUMN guarantee_deposit SET DEFAULT 0;
UPDATE sht.payment
SET guarantee_deposit = 0
WHERE guarantee_deposit IS NULL; |
alter table ACT_HI_ACTINST add column TRANSACTION_ORDER_ integer;
|
delete from HtmlLabelIndex where id=27253
/
delete from HtmlLabelInfo where indexid=27253
/
INSERT INTO HtmlLabelIndex values(27253,'固定资产报表')
/
INSERT INTO HtmlLabelInfo VALUES(27253,'固定资产报表',7)
/
INSERT INTO HtmlLabelInfo VALUES(27253,'gudingzichanreport',8)
/
INSERT INTO HtmlLabelInfo VALUES(27253,'固定資産報表',9)
/ |
SELECT dte.id_tipo_egreso, (SUM(fac.total_egreso_dia)/COUNT(dte.id_tipo_egreso)) total
FROM DatamartEgresos.fac_egresos_diarios fac
INNER JOIN DatamartEgresos.dim_tipo_egreso dte ON (dte.id_tipo_egreso = fac.id_tipo_egreso)
GROUP BY dte.id_tipo_egreso |
create table distributor
(
did number(10) primary key,
dname varchar2(20) not null unique,
dtel number(20) not null unique,
demail varchar2(20) unique
);
create table goods
(
gid number(13) primary key,
gname varchar2(50) not null uniqu... |
SELECT * FROM Person.Person WHERE PersonType = 'EM'
SELECT * FROM Person.Person WHERE FirstName = 'Ken'
SELECT Name, ProductNumber,Color, SafetyStockLevel FROM Production.Product WHERE Color = 'Black' AND SafetyStockLevel = 500
SELECT * FROM Production.Product WHERE SafetyStockLevel > 500
SELECT * FROM Produc... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th1 09, 2019 lúc 03:03 AM
-- Phiên bản máy phục vụ: 10.1.25-MariaDB
-- Phiên bản PHP: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50710
Source Host : localhost:3306
Source Database : kahina
Target Server Type : MYSQL
Target Server Version : 50710
File Encoding : 65001
Date: 2016-02-18 14:33:50
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... |
-- Insert a row into a table
INSERT INTO first_table(id, name)
VALUES(89, 'Holberton School');
|
UPDATE Users SET
PhoneNumber = @PhoneNumber
WHERE
ID = @ID |
-- ************************************** `create database filer-loader`
CREATE DATABASE "filer-loader"
WITH
OWNER = postgres
ENCODING = 'UTF8'
CONNECTION LIMIT = -1;
COMMENT ON DATABASE "filer-loader"
IS 'filer-loader database';
-- ************************************** `tbl_status`
CREATE TAB... |
DROP TABLE IF EXISTS tonlist_auth_type;
CREATE TABLE tonlist_auth_type(
id tinyint(3) unsigned PRIMARY KEY,
name varchar(32)
);
INSERT INTO tonlist_auth_type(id, name) VALUES(1, 'Google');
INSERT INTO tonlist_auth_type(id, name) VALUES(2, 'Facebook');
DROP TABLE IF EXISTS tonlist_user;
CREATE TABLE tonlist_us... |
select
sql_fulltext sqltext,
ses.sid, ses.serial#, ses.osuser,
lng.message,
to_char(lng.start_time,'hh24:mi:ss') stime
-- (lng.sofar/lng.totalwork) * 100 percent
-- substr(sql.sql_text, 1, 10000) sql
from v$session ses, v$session_longops lng, v$sqlarea sql
where
ses.sql_hash_value = sql.hash_value and
ses.s... |
DROP TABLE IF EXISTS user;
DROP TABLE IF EXISTS transfers;
DROP TABLE IF EXISTS admins;
DROP TABLE IF EXISTS comments;
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
email TEXT UNIQUE NOT NULL,
password TEXT NOT NULL
);
CREATE TABLE admins (
id INTEGER PRIMARY KEY AUT... |
SELECT dropIfExists('TABLE', 'armemo');
|
-- add all your SQL setup statements here.
-- You can assume that the following base table has been created with data loaded for you when we test your submission
-- (you still need to create and populate it in your instance however),
-- although you are free to insert extra ALTER COLUMN ... statements to change the ... |
CREATE DATABASE ftpusers;
\c ftpusers
CREATE TABLE ftp_user (name VARCHAR(20), password VARCHAR(20));
ALTER TABLE ftp_user OWNER TO gigadb;
insert into ftp_user values ('user1','gigadb1');
insert into ftp_user values ('user2','gigadb2');
insert into ftp_user values ('user3','gigadb3');
insert into ftp_user values ('us... |
create table ProdFacility
(
Contract_Reference nvarchar(100) Primary Key,
Amount float,
Amount_1 float,
Amount_2 float,
Used_Amount float,
Available_Amount float
Foreign Key (Contract_Reference) References QAFacility (Contract_Reference)
)
select * from QAFacility
select * from ProdFacility
select q.Con... |
CREATE TABLE `categories` (
`id` int NOT NULL AUTO_INCREMENT,
`title` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; |
/*
Navicat MySQL Data Transfer
Source Server : zyt
Source Server Version : 50722
Source Host : localhost:3306
Source Database : pv4.0
Target Server Type : MYSQL
Target Server Version : 50722
File Encoding : 65001
Date: 2019-04-07 16:01:41
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... |
/*
* 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: Himanshu
* Created: 11 Jul, 2018
*/
Actor(actorid,name,sex,dob,bio)
Movie_Actor_rel(movieid,actorid)
Movie(movie... |
-- create and grants create a new user and set a privileges
-- create and grants create a new user and set a privileges
SELECT tv_genres.name AS genre,
COUNT(tv_show_genres.genre_id) AS number_of_shows
FROM tv_genres
JOIN tv_show_genres
ON tv_show_genres.genre_id = tv_genres.id
GROUP BY genre
ORDER BY number_of_shows D... |
create table family_to_technology(
family varchar(16) not null,
technology varchar(16) not null,
constraint f2t_pk PRIMARY KEY (family)
)
|
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS items;
DROP TABLE IF EXISTS shadows;
DROP TABLE IF EXISTS edits; |
CREATE TABLE `sdliticadb`.`USERS` (
`ID` VARCHAR(36) NOT NULL,
`FIRST_NAME` VARCHAR(45) NULL,
`LAST_NAME` VARCHAR(45) NULL,
`EMAIL` VARCHAR(45) NOT NULL,
`PASSWORD` VARCHAR(256) NOT NULL,
CONSTRAINT `USERS_PK`
PRIMARY KEY (`ID`),
UNIQUE INDEX `USERS_ID_UI` (`ID` ASC),
UNIQUE INDEX `USERS_EMAIL_UI` (... |
/* 以下是关于陈英杰外部用户接口的的脚本*/
create table ycuser
(id integer not null,
loginid Varchar2(60) null,
logintype integer default(1))
/
insert into ycuser (id,loginid,logintype) values(1,'gmanager',1)
/
insert into ycuser (id,loginid,logintype) values(2,'sysadmin',1)
/
create or replace procedure Ycuser_Insert
(id... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.