text stringlengths 6 9.38M |
|---|
insert into CUSTOMERS (CUSTOMER_NAME, PASSWORD, EMAIL) VALUES ('Michael', 'Bo$$', 'mscott@dundermifflin.com');
insert into CUSTOMERS (CUSTOMER_NAME, PASSWORD, EMAIL) VALUES ('Pam', 'P@mP@m', 'pbeesley@dundermifflin.com');
insert into CUSTOMERS (CUSTOMER_NAME, PASSWORD, EMAIL) VALUES ('Jim', 'ILoveP@m', 'jhalpert@dundermifflin.com');
insert into EVENTS (EVENT_CODE, TITLE, DESCRIPTION ) VALUES ('CNF001', 'All-Java Conference', 'Lectures and exhibits covering all Java topics' );
insert into EVENTS (EVENT_CODE, TITLE, DESCRIPTION ) VALUES ('WKS002', 'Spring Boot Workshop', 'Hands-on Spring Boot Workshop' );
insert into EVENTS (EVENT_CODE, TITLE, DESCRIPTION ) VALUES ('TRN003', 'Angular Training Course', 'Five day introductory training in Angular' );
insert into REGISTRATIONS (EVENT_ID, CUSTOMER_ID, REGISTRATION_DATE, NOTES )
values ( 1, 1, '2019-01-15 00:00:00.0', 'please email me the event details' );
insert into REGISTRATIONS (EVENT_ID, CUSTOMER_ID, REGISTRATION_DATE, NOTES )
values ( 1, 2, '2019-01-17 00:00:00.0', 'looking for info on local hotels' );
insert into REGISTRATIONS (EVENT_ID, CUSTOMER_ID, REGISTRATION_DATE, NOTES )
values ( 1, 3, '2019-01-13 00:00:00.0', 'na' );
|
### Schema
CREATE DATABASE quotes_db;
USE quotes_db;
CREATE TABLE quotes_db
(
id int NOT NULL AUTO_INCREMENT,
author varchar(255) NOT NULL,
quote TEXT NOT NULL,
PRIMARY KEY(id)
) |
INSERT INTO burgers (burger_name)
VALUES ("Galaxy Burger"),
("Texas Ranch Burger"),
("Japaneese Sushi Burger"); |
--begin addby daijiy 2016-7-16
@repeat{SELECT COUNT(*) FROM exceptioninfo where ID=690}
insert into exceptioninfo (ID, CODE, MSG, MODULES)
values (690, '0690', '该班次号在此日期段内已经存在班次计划!', '添加班次信息');
@repeat{SELECT COUNT(*) FROM parameter where ID=160070791}
insert into parameter (ID, TYPE, CODE, VALUE, ISVISIBLE, ISEDITABLE, REMARK, UPDATETIME, UPDATEBY, UNIT)
values (160070791, '30', '3038', '0', 1, 1, '是否实名制检票,0不实名制,1实名制,默认为0。', sysdate, 1158013, '是否');
--end |
--修改日期:2012.11.28
--修改人:刘之三
--修改内容:以收定支
--修改原因:以收定支
DECLARE
VN_COUNT NUMBER;
BEGIN
SELECT COUNT(*)
INTO VN_COUNT
FROM bt_param
WHERE CODE= 'isPayCtrl' AND SYS_CODE='fbs';
IF VN_COUNT < 1 THEN
insert into bt_param (CODE, SYS_CODE, NAME, PARAM_VALUE1, PARAM_VALUE2, PARAM_VALUE3, PARAM_TYPE, RMK, REVERSE1, REVERSE2, REVERSE3, REVERSE4, REVERSE5, REVERSE6, REVERSE7, REVERSE8, REVERSE9, REVERSE10)
values ('isPayCtrl', 'fbs', '是否执行以收定支控制', '1', null, null, '0', '是否执行以收定支控制.1是;0否', '1,是;0,否;', '', '', '', '', 1.00, 48.00, null, null, null);
END IF;
COMMIT;
END;
/ |
create table if not exists training
(
id bigint generated by default as identity primary key,
name varchar(255) not null,
surname varchar(255) not null,
email varchar(255) not null,
hasAttend boolean,
score int
); |
select log_id, log_date, window_name, operation, status
from dba_scheduler_window_log;
|
CREATE DATABASE spary;
CREATE DATABASE spary_test;
CREATE USER spary_admin IDENTIFIED BY 'spary@YRAPS';
GRANT ALL PRIVILEGES ON spary.* TO 'spary_admin'@'%';
GRANT ALL PRIVILEGES ON spary_test.* TO 'spary_admin'@'%';
FLUSH PRIVILEGES;
|
CREATE Procedure sp_GetDsValue(@Position as Integer, @Active as Integer = 2)
As
Begin
Select Distinct DSTypeID,DSTypeValue From DSType_Master Where DSTypeCtlPos = @Position and Active = ( Case when @Active = 1 then 1 Else Active End ) And
( Case when DSTypeCtlPos = 1 then
(Select flag from tbl_merp_Configabstract where ScreenCode = 'OCGDS' and ScreenName ='OperationalCategoryGroup')
Else IsNull(OCGtype, 0)
End ) = IsNull(OCGtype, 0)
End
|
-- View: vg_closing_stock_location_serial_stock_history_2
-- DROP VIEW vg_closing_stock_location_serial_stock_history_2;
CREATE OR REPLACE VIEW vg_closing_stock_location_serial_stock_history_2 AS
WITH slh_cum_qty AS (
SELECT slh.id,
slh.move_id,
slh.location_id,
slh.company_id,
slh.product_id,
slh.product_categ_id,
slh.prodlot_id,
slh.quantity,
slh.date,
sum(slh.quantity) OVER (PARTITION BY slh.product_id, slh.prodlot_id ORDER BY slh.date, slh.move_id) AS cum_qty
FROM stock_lot_history slh
), stock_product_lot_sum AS (
SELECT h.product_id,
h.prodlot_id,
sum(h.quantity) AS qty
FROM stock_lot_history h,
stock_move m
WHERE h.move_id = m.id
GROUP BY h.product_id, h.prodlot_id
), stock_product_lot_non_zero AS (
SELECT y.product_id,
y.prodlot_id,
y.qty
FROM stock_product_lot_sum y
WHERE y.qty <> 0::double precision
), slh_less_balance_qty AS (
SELECT x.id,
x.move_id,
x.location_id,
x.company_id,
x.product_id,
x.product_categ_id,
x.prodlot_id,
x.quantity,
x.date,
x.cum_qty
FROM slh_cum_qty x
JOIN stock_product_lot_non_zero f ON x.product_id = f.product_id AND x.prodlot_id = f.prodlot_id
WHERE x.quantity > 0::double precision AND x.cum_qty <= f.qty AND x.cum_qty > 0::double precision
), slh_less_balance_rank AS (
SELECT y.id,
y.move_id,
y.location_id,
y.company_id,
y.product_id,
y.product_categ_id,
y.prodlot_id,
y.quantity,
y.date,
y.cum_qty,
row_number() OVER (PARTITION BY y.product_id, y.prodlot_id, y.cum_qty ORDER BY y.product_id, y.prodlot_id, y.cum_qty, y.date DESC) AS rnk
FROM slh_less_balance_qty y
)
SELECT z.id,
z.move_id,
z.location_id,
z.product_id,
z.product_categ_id,
z.prodlot_id,
l.complete_name AS location,
v.product_category,
v.product_name,
z.quantity,
s.name AS gtr_no,
s.create_date::date AS incoming_date,
s.x_greentek_lot AS lot_no,
s.x_transfer_price_cost AS transfer_price
FROM slh_less_balance_rank z
JOIN stock_location l ON z.location_id = l.id
JOIN vg_product_category v ON z.product_id = v.id
LEFT JOIN stock_production_lot s ON z.prodlot_id = s.id
WHERE z.rnk = 1;
ALTER TABLE vg_closing_stock_location_serial_stock_history_2
OWNER TO odoo;
|
SELECT DISTINCT l1.Num AS ConsecutiveNums
FROM Logs l1, Logs l2, Logs l3
WHERE l1.Id+1=l2.Id AND l2.id+1=l3.id AND l1.Num=l2.Num AND l2.Num=l3.Num; |
-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 25-09-2018 a las 11:03:50
-- Versión del servidor: 5.7.17-log
-- Versión de PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de datos: `appmarket`
--
DELIMITER $$
--
-- Procedimientos
--
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_producto` (IN `cod` INT) BEGIN
select
products.id,
products.name as product,
price,
marks.name as mark
from
products
inner join
marks on marks.id = products.marks_id
where
marks.id = cod;
END$$
DELIMITER ;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `callespoblaciones`
--
CREATE TABLE `callespoblaciones` (
`idCalle` int(10) UNSIGNED NOT NULL,
`CodPoblacion` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`nombre` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`CodPostal` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Volcado de datos para la tabla `callespoblaciones`
--
INSERT INTO `callespoblaciones` (`idCalle`, `CodPoblacion`, `nombre`, `CodPostal`) VALUES
(1, '7475647', 'Bugaba', '28738'),
(2, '763655', 'Aserrio', '90012');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `marks`
--
CREATE TABLE `marks` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Volcado de datos para la tabla `marks`
--
INSERT INTO `marks` (`id`, `name`) VALUES
(1, 'Estrella'),
(2, 'La Dulce'),
(3, 'Limpia todo'),
(4, 'Nissan'),
(5, 'Toyota');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Volcado de datos para la tabla `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2018_05_30_040344_mark_table', 1),
(4, '2018_05_30_040448_product_table', 1),
(6, '2018_08_08_170101_callespoblaciones', 2);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `producto_venta`
--
CREATE TABLE `producto_venta` (
`id` int(11) NOT NULL,
`products_id` int(11) DEFAULT NULL,
`venta` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Volcado de datos para la tabla `producto_venta`
--
INSERT INTO `producto_venta` (`id`, `products_id`, `venta`) VALUES
(1, 2, 4),
(2, 5, 8),
(3, 2, 4),
(4, 3, 10),
(5, 2, 6),
(6, 2, 2);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `products`
--
CREATE TABLE `products` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`price` decimal(5,2) NOT NULL,
`marks_id` int(10) UNSIGNED NOT NULL,
`image` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Volcado de datos para la tabla `products`
--
INSERT INTO `products` (`id`, `name`, `price`, `marks_id`, `image`) VALUES
(2, 'La limpiadora', '36.80', 2, '1535140829.jpg'),
(3, 'Algo', '450.00', 3, '1535142010.jpg'),
(5, 'Azúcar', '56.35', 1, '1536972200.PNG'),
(33, 'Casa', '700.00', 1, NULL),
(34, 'fdf', '33.00', 5, NULL),
(35, 'fdfdf', '455.00', 2, NULL);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `users`
--
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Volcado de datos para la tabla `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Prueba', 'prueba@hotmail.com', '$2y$10$SIHKknG1xDgUHvLwxQn2B.z.dfFtsEU/zqjVztmBvHy92N3Gb1Xk2', 's9Gn24g8Uu7HALy34nUINFXnyEjngGSb9HPm4ZwUqghcncq3s4Qx3WlF7z3x', '2018-06-28 21:38:57', '2018-06-28 21:38:57'),
(2, 'developer', 'developers@hotmail.com', '$2y$10$bTDRV6DKEPKcOerDmwuiUu8shZSq/xola/yX0gjKinCxfB4TPi7PG', 'B2v7olicIM7VJk1742k2xptz1mdYcMr4ShPmgKqduAUQAXdoAIw0ko2WrZPD', '2018-07-16 22:02:31', '2018-07-16 22:02:31'),
(3, 'operador', 'operador@elcades.com', '$2y$10$hDj.bHHhK3n9RLtjejZr8uYEBlHxm.aQO0z.kbX9wBh02X7d/c7Dq', 'q2mGNuzKNY7KdsNhQCGTzUPBvxAOjFd9lj9ajOOwIspYM4vTRzZ89Xt13SPY', '2018-07-16 22:26:16', '2018-07-16 22:26:16'),
(4, 'aaa', 'aaa@hotmail.com', '$2y$10$rb0DYu53ukgYXfn3LkvE4OYAthDQeU3V11AzfEyHYXdvGi9wCzgCi', 'OzEK4RiCcdsrUjWy3G1vDsn55I5Dbyyznuk5dpGvvEz41CfOL1DMiu31txfA', '2018-07-16 22:46:45', '2018-07-16 22:46:45'),
(5, 'prueba', 'prueba12@hotmail.com', '$2y$10$njKPbo27jqnihoBpX0bhgevAY7rBlKpJ3lB4TGNacB06Nfxqac3ea', NULL, '2018-08-30 22:21:26', '2018-08-30 22:21:26'),
(6, 'test', 'test2@hotmail.com', '$2y$10$GAnrtBF4Rlj03.cT6e4VKu.6G.vnTX/NQ66MWYp8GWr4wd4j9ERUG', 'uSwugegSTg6V7wSKdYAI3pdlaaq7MEQON9CZbYQfMokaKLPuI8ZumtERk6NO', '2018-09-04 09:25:02', '2018-09-04 09:25:02');
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `callespoblaciones`
--
ALTER TABLE `callespoblaciones`
ADD PRIMARY KEY (`idCalle`);
--
-- Indices de la tabla `marks`
--
ALTER TABLE `marks`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indices de la tabla `producto_venta`
--
ALTER TABLE `producto_venta`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`id`),
ADD KEY `products_marks_id_foreign` (`marks_id`);
--
-- Indices de la tabla `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `callespoblaciones`
--
ALTER TABLE `callespoblaciones`
MODIFY `idCalle` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT de la tabla `marks`
--
ALTER TABLE `marks`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT de la tabla `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT de la tabla `producto_venta`
--
ALTER TABLE `producto_venta`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT de la tabla `products`
--
ALTER TABLE `products`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;
--
-- AUTO_INCREMENT de la tabla `users`
--
ALTER TABLE `users`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- Restricciones para tablas volcadas
--
--
-- Filtros para la tabla `products`
--
ALTER TABLE `products`
ADD CONSTRAINT `products_marks_id_foreign` FOREIGN KEY (`marks_id`) REFERENCES `marks` (`id`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
-- add table prefix if you have one
DELETE FROM core_config_data WHERE path like 'ffuenf_categoryproductsortbackend_setup/%';
DELETE FROM core_config_data WHERE path = 'advanced/modules_disable_output/Ffuenf_CategoryProductSortBackend';
DELETE FROM core_resource WHERE code = 'ffuenf_categoryproductsortbackend_setup'; |
-- ----------------------------
-- Table structure for other_customer
-- ----------------------------
DROP TABLE IF EXISTS `customer`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer` (
`id` bigint NOT NULL AUTO_INCREMENT,
`user_name` varchar(32) DEFAULT NULL,
`password` varchar(128) DEFAULT NULL,
`real_name` varchar(32) DEFAULT NULL,
`gender` tinyint DEFAULT NULL,
`birthday` date DEFAULT NULL,
`point` int DEFAULT NULL,
`state` tinyint DEFAULT NULL,
`email` varchar(128) DEFAULT NULL,
`mobile` varchar(128) DEFAULT NULL,
`be_deleted` tinyint DEFAULT NULL,
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`gmt_modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17330 DEFAULT CHARSET=utf8; |
use www;
-- 2011.1.1起有>=2条点评:点评内容有“24小时”(328)
-- 2011.1.1起有=1条点评,且点评标签有“24小时营业”:点评内容有“24小时”(102)
create table if not exists mwt_certain_24H_shop(shopid int, cityid int ,tag string);
insert overwrite table mwt_certain_24H_shop
select shop_id , city_id, "24H"
from bi.dpdim_dp_shop where hp_valid_end_dt = "3000-12-31" and power >= 5
and city_id = 1 and cat0_id = 10
and shop_tags like '%24小时营业%'
;
create table if not exists mwt_certain_24H_shop_reviewbody(shopid int ,reviewid int, userid int, username string, reviewbody string, dt string);
insert overwrite table mwt_certain_24H_shop_reviewbody
select distinct rs.shopid as shopid, rs.reviewid, rs.userid,' ', rb.reviewbody as reviewbody, rs.dt as dt from
(select r.shopid as shopid, r.reviewid as reviewid, r.userid as userid, r.addtime as dt from
mwt_certain_24H_shop s
inner join
(select reviewid,userid,shopid, addtime from
bi.dpods_dp_review where hp_valid_end_dt = '3000-12-31'
and addtime > '2011-01-01'
) r
on s.shopid = r.shopid
) rs
inner join
bi.dpods_dp_kv_reviewbody rb
on rs.reviewid = rb.reviewid
where reviewbody like "%24小时%"
distribute by shopid
sort by shopid , dt desc
;
insert overwrite table mwt_certain_24H_shop_reviewbody
select distinct shopid, reviewid, a.user_id, a.user_nickname, reviewbody ,dt from
(select user_id , user_nickname from bi.dpdim_dp_user where valid_end_dt = "3000-12-31") a
inner join
mwt_certain_24H_shop_reviewbody b
on a.user_id = b.userid
distribute by shopid
sort by shopid , dt desc
;
-----------------------------------------------------------------
create table if not exists mwt_uncertain_24H_shop(shopid int, count int);
insert overwrite table mwt_uncertain_24H_shop
select a.shopid, a.score from
(select shopid, sum(score) as score from mwt_review_word where word = "24小时"
group by shopid) a
left outer join
mwt_certain_24H_shop b
on a.shopid = b.shopid
where b.shopid is null
;
insert overwrite table mwt_uncertain_24H_shop
select s.shopid, s.count from
mwt_uncertain_24H_shop s
inner join
(select shop_id, city_id from bi.dpdim_dp_shop
where hp_valid_end_dt = "3000-12-31"
and power >= 5
and city_id = 1 and cat0_id = 10
) t
on s.shopid = t.shop_id
;
create table if not exists mwt_uncertain_24H_shop_reviewbody(shopid int ,reviewid int, userid int,username string, reviewbody string, dt string);
insert overwrite table mwt_uncertain_24H_shop_reviewbody
select rs.shopid as shopid, rs.reviewid, rs.userid,' ', rb.reviewbody as reviewbody, rs.dt as dt from
(select r.shopid as shopid, r.reviewid as reviewid, r.userid as userid, r.addtime as dt from
mwt_uncertain_24H_shop s
inner join
(select reviewid,userid,shopid, addtime from
bi.dpods_dp_review where hp_valid_end_dt = '3000-12-31'
and addtime > '2011-01-01'
) r
on s.shopid = r.shopid
) rs
inner join
bi.dpods_dp_kv_reviewbody rb
on rs.reviewid = rb.reviewid
where reviewbody like "%24小时%"
distribute by shopid
sort by shopid , dt desc
;
create table if not exists mwt_uncertain_24H_shop_reviewbody(shopid int, reviewid int, userid int, username string, reviewbody string, dt string);
insert overwrite table mwt_uncertain_24H_shop_reviewbody
select distinct shopid, reviewid, a.user_id, a.user_nickname, reviewbody ,dt from
(select user_id , user_nickname from bi.dpdim_dp_user where valid_end_dt = "3000-12-31") a
inner join
mwt_uncertain_24H_shop_reviewbody b
on a.user_id = b.userid
distribute by shopid
sort by shopid , dt desc
;
|
--2. Create a new table: 'PRINTED_ORDERS' (id type number (generated with a sequence), details type clob).
DROP TABLE printed_orders;
CREATE TABLE printed_orders
(
id_printed_order NUMBER PRIMARY KEY,
details CLOB
);
DROP SEQUENCE seq_printed_order_id;
CREATE SEQUENCE seq_printed_order_id
START WITH 1
INCREMENT BY 1
NOCACHE
NOCYCLE;
|
INSERT INTO `bet365`.`sport` (`idSport`,`name`) VALUES (1, 'Futebol Virtual');
INSERT INTO `bet365`.`sport` (`idSport`,`name`) VALUES (2, 'Futebol');
INSERT INTO `bet365`.`market` (`idMarket`, `name`, `idSport`) VALUES (1, 'Vencedor do Jogo', 1);
INSERT INTO `bet365`.`market` (`idMarket`, `name`, `idSport`) VALUES (2, 'Número de Gols', 1);
INSERT INTO `bet365`.`market` (`idMarket`, `name`, `idSport`) VALUES (3, 'Resultado Correto', 1);
INSERT INTO `bet365`.`market` (`idMarket`, `name`, `idSport`) VALUES (4, 'Time a Marcar Primeiro', 1);
INSERT INTO `bet365`.`market` (`idMarket`, `name`, `idSport`) VALUES (5, 'Intervalo - Resultado Correto', 1);
INSERT INTO `bet365`.`market` (`idMarket`, `name`, `idSport`) VALUES (6, 'Total de Gols', 1);
INSERT INTO `bet365`.`market` (`idMarket`, `name`, `idSport`) VALUES (7, 'Para Ambos os Times Marcarem', 1);
INSERT INTO `bet365`.`market` (`idMarket`, `name`, `idSport`) VALUES (8, 'Para o Time Da Casa Marcar', 1);
INSERT INTO `bet365`.`market` (`idMarket`, `name`, `idSport`) VALUES (9, 'Para o Time Visitante Marcar', 1);
INSERT INTO `bet365`.`competition` (`idCompetition`, `description`, `alternativeDescription`, `idSport`) VALUES (20120650, 'Copa do Mundo', 'Campeonato do Mundo', 1);
INSERT INTO `bet365`.`competition` (`idCompetition`, `description`, `alternativeDescription`, `idSport`) VALUES (20120654, 'Superleague', 'Superliga', 1);
INSERT INTO `bet365`.`competition` (`idCompetition`, `description`, `alternativeDescription`, `idSport`) VALUES (20640325, 'Premiership', 'Premiership', 1);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (1, 'over 0.5', 6);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (2, 'under 0.5', 6);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (3, 'over 1.5', 6);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (4, 'under 1.5', 6);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (5, 'over 2.5', 6);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (6, 'under 2.5', 6);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (7, 'over 3.5', 6);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (8, 'under 3.5', 6);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`, `idMarket`) VALUES (14, 'ambas sim', 7);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`, `idMarket`) VALUES (15, 'ambas nao', 7);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (9, 'gol 0', 2);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (10, 'gol 1', 2);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (11, 'gol 2', 2);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (12, 'gol 3', 2);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (13, 'gol 4', 2);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (16, '0x0 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (17, '1x1 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (18, '2x2 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (19, '1x0 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (20, '2x0 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (21, '2x1 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (22, '3x0 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (23, '3x1 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (24, '4x0 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (25, '0x1 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (26, '0x2 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (27, '1x2 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (28, '0x3 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (29, '1x3 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (30, '0x4 FT', 3);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (31, '0x0 HT', 5);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (32, '1x1 HT', 5);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (33, '1x0 HT', 5);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (34, '2x0 HT', 5);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (35, '0x1 HT', 5);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (36, '0x2 HT', 5);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (37, 'outro HT', 5);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (38, 'mandante HT', 1);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (39, 'empate HT', 1);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (40, 'visitante HT', 1);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (41, 'mandante FT', 1);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (42, 'empate FT', 1);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (43, 'visitante FT', 1);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (44, 'casa marca sim', 8);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (45, 'casa marca nao', 8);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (46, 'visitante marca sim', 9);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (47, 'visitante marca nao', 9);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (48, 'casa marca primeiro sim', 4);
INSERT INTO `bet365`.`typemarket` (`idTypeMarket`,`label`,`idMarket`) VALUES (49, 'casa marca primeiro nao', 4); |
# 1. Schreiben Sie eine Abfrage, die die Summe des Warenbestandes (UnitsInStock)
# der Produkte mit der Kategorie ID 7 ausgibt.
SELECT SUM(products.UnitsInStock) AS 'Summe'
FROM products
WHERE products.CategoryID = 7;
# 2. Schreiben Sie eine Abfrage, die die Summe des Warenbestandes (UnitsInStock)
# der Produkte für jede einzelne CategoryId anzeigt
SELECT products.CategoryID, SUM(products.UnitsInStock) AS 'Summe'
FROM products
GROUP BY products.CategoryID;
# 3. Kein NULL in den Ergebnissen
SELECT products.CategoryID, SUM(products.UnitsInStock) AS 'Summe'
FROM products
GROUP BY products.CategoryID
HAVING products.CategoryID > 0;
|
Create Procedure mERP_sp_GetFieldStatus(@ScreenCode nVarchar(100),@Flag Int = -1)
As
Begin
If @Flag = -1
Select ControlName, ControlIndex, isNull(Flag,1) As Flag,AllowConfig, TabIndex, TabLevel
From tbl_mERP_ConfigDetail
Where ScreenCode = @ScreenCode
Else
Select ControlName, ControlIndex, isNull(Flag,1) As Flag,AllowConfig, TabIndex, TabLevel
From tbl_mERP_ConfigDetail
Where ScreenCode = @ScreenCode And isNull(Flag,1) = @Flag
End
|
-- 20 Jan 2017
-- Example changeset to create for database changes.
-- Add changeset to system.version table so its possible to determine if hte chagneset has been run.
INSERT INTO system.version SELECT '1701a' WHERE NOT EXISTS (SELECT version_num FROM system.version WHERE version_num = '1701a');
-- Changeset SQL to go below. Provide comments for the SQL statements to clarify their purpose. |
with ranked as (
select
*,
dense_rank() over (
partition by customer_id
order by order_id
) as order_num
from {{ref('fct_order_items')}}
)
select
customer_id,
{% for order in [1,2,3] %}
sum(
case when order_num = {{order}}
then price
else 0
end
) as order_{{order}}_total
{{ "," if not loop.last }}
{% endfor %}
from ranked
group by 1 |
create table EMP_15(EMPNO number,
ENAME varchar2(10),
JOB char(15),
MGR number,
HIREDATE date,
SAL number,
COMM number,
DEPT_NAME number);
insert into EMP_15 values(&EMPNO,'&ENAME','&JOB',&MGR,'&HIREDATE',&SAL,&COMM,&DEPTNO);
#1
select ENAME from EMP_15 where SAL = (select max(SAL) from EMP_15);
#2
select ENAME from EMP_15 where SAL = (select max(SAL) from EMP_15 where JOB = 'Salesman');
#3
select ENAME from EMP_15 where SAL = (select min(SAL) from EMP_15 where JOB = 'Clerk');
#4
select DEPT_NAME from EMP_15 having avg(SAL) = (
select max(AVG) from (
select DEPT_NAME ,avg(SAL) as "AVG" from EMP_15 group by DEPT_NAME)) group by DEPT_NAME;
#5
select ENAME from EMP_15 where SAL > (select SAL from EMP_15 where ENAME = 'Turner');
#6
select ENAME from EMP_15 where HIREDATE > (select HIREDATE from EMP_15 where ENAME = 'Allen');
#7
select DEPT_NAME from EMP_15 where ENAME = 'Ford';
#8
select DEPT_NAME from EMP_15 where SAL = (select max(SAL) from EMP_15);
#9
select LOC from DEPT_15 where DEPTNO = (select DEPT_NAME from EMP_15 where ENAME = 'Smith');
#10
select LOC from DEPT_15 where DEPTNO in (select DEPT_NAME from EMP_15 where JOB = 'Manager');
#11
select SAL from EMP_15 where ENAME='Martin';
#12
select ENAME from EMP_15 where SAL > (
select max(SAL) from EMP_15 where DEPT_NAME in (
select DEPTNO from DEPT_15 where LOC = 'Dallas'));
#13
select DEPT_NAME from EMP_15 having count(*) = 0 group by DEPT_NAME;
#14
select ENAME from EMP_15 where HIREDATE = (select HIREDATE from EMP_15 where ENAME = 'Adams');
#15
select distinct DEPT_NAME from EMP_15 where COMM <> 0;
#16
select ENAME, SAL from EMP_15 where SAL in (select min(SAL) from EMP_15 group by DEPT_NAME); |
insert INTO area(idarea, nombre, descripcion) VALUES (1, 'matematicas', 'area de matematicas');
insert INTO area(idarea, nombre, descripcion) VALUES (2, 'algoritmos', 'area de algoritmos');
insert INTO area(idarea, nombre, descripcion) VALUES (3, 'redes', 'area de redes');
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (1, 1, 'calculo I', 'curso de ciencias basicas', '01', 3);
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (2, 1, 'calculo II', 'curso de ciencias basicas', '02', 3);
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (3, 1, 'calculo III', 'curso de ciencias basicas', '03', 3);
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (4, 1, 'ecuaciones diferenciales', 'curso de ciencias basicas, ecuaciones', '04', 3);
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (5, 2, 'logica computacional', 'conceptos basicos de programacion', '02', 3);
insert INTO asignatura(
idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (6, 2, 'Programacion I', 'Programacion basica', '03', 4);
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (7, 2, 'Programacin II', 'Estructuras de datos', '04', 4);
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (8, 2, 'metodos numericos', 'metodos numericos y programacion', '05', 4);
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (9, 2, 'Desarrollo de software libre', 'Desarrollo de aplicacion con c#', '08', 3);
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (10, 2, 'Desarrollo web', 'programacion para la web', '09', 3);
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (11, 3, 'telematica', 'Introduccion a la telematica', '07', 3);
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (12, 3, 'redes locales', 'configuracin de redes locales', '09', 3);
insert INTO asignatura(idasignatura, idarea, nombre, descripcion, semestre, numerocreditos)
VALUES (13, 3, 'configuracion de redes', 'configuracion de redes de area extensa', '10', 3);
insert INTO facultad(idfacultad, nombre, descripcion)
VALUES (1, 'Ciencias basicas', 'matematicas, quimica, fisica, biologia, entre otras');
insert INTO facultad(idfacultad, nombre, descripcion)
VALUES (2, 'Ingenierias', 'Ing. de sistemas, Ing. Industrial, Ing. de Alimentos, entre otros.');
insert INTO facultad(idfacultad, nombre, descripcion)
VALUES (3, 'Medicina veterinaria y zootecnia', 'veterinaria y zootecnia');
insert INTO facultad(idfacultad, nombre, descripcion)
VALUES (4, 'Ciencias agricolas', 'El campo y los alimentos');
insert INTO facultad(idfacultad, nombre, descripcion)
VALUES (5, 'Ciencias de la salud', 'la salud');
insert INTO departamento(iddpto, idfacultad, nombre, descripcion)
VALUES (1, 2, 'Ingenieria de sistemas y telecomunicaciones', 'Departamento de los ingenieros de sistemas.');
insert INTO departamento(iddpto, idfacultad, nombre, descripcion)
VALUES (2, 2, 'Ingenieria Industrial', 'Departamento de los ingenieros industriales');
insert INTO departamento(iddpto, idfacultad, nombre, descripcion)
VALUES (3, 1, 'Matematicas y estadistica', 'departamento de loquillos');
insert INTO departamento(iddpto, idfacultad, nombre, descripcion)
VALUES (4, 3, 'Medicina veterinaria y zootecnia', 'Medicos veterinarios');
insert INTO departamento(iddpto, idfacultad, nombre, descripcion)
VALUES (5, 4, 'Ingenieria Agronomica', 'departamento de agronomos');
insert INTO departamento(iddpto, idfacultad, nombre, descripcion)
VALUES (6, 4, 'Ingenieria de Alimentos', 'departamento de ingenieros de alimentos');
insert INTO departamento(iddpto, idfacultad, nombre, descripcion)
VALUES (7, 5, 'Enfermeria', 'Los enfermeros');
insert INTO departamento(iddpto, idfacultad, nombre, descripcion)
VALUES (8, 5, 'Bacteriologia', 'Bacteriologos');
insert INTO programa(idprog, iddpto, nombre, descripcion)
VALUES (1, 1, 'Ing. de sistemas', 'programa de ing. de sistemas.');
insert INTO programa(idprog, iddpto, nombre, descripcion)
VALUES (2, 2, 'Ing. Industrial', 'programa de ing. Industrial.');
insert INTO programa(idprog, iddpto, nombre, descripcion)
VALUES (3, 3, 'Matematicas', 'matematicos');
insert INTO programa(idprog, iddpto, nombre, descripcion)
VALUES (4, 3, 'Estadisticas', 'programa de estadistica');
insert INTO programa(idprog, iddpto, nombre, descripcion)
VALUES (5, 4, 'Veterinaria', 'Medicina veterinaria');
insert INTO programa(idprog, iddpto, nombre, descripcion)
VALUES (6, 5, 'Ing. Agronomica', 'agronomia');
insert INTO programa(idprog, iddpto, nombre, descripcion)
VALUES (7, 6, 'Ing. Alimentos', 'Ing. de alimentos');
insert INTO programa(idprog, iddpto, nombre, descripcion)
VALUES (8, 7, 'Enfermeria', 'Enfermeros');
insert INTO programa(idprog, iddpto, nombre, descripcion)
VALUES (9, 8, 'Bacteriologia', 'Bacteriologos');
insert INTO permiso(idpermiso, descripcion, nombrepermiso, estado)
VALUES (1, 'Permisos estudiantes activos', 'est001', '01');
insert INTO permiso(
idpermiso, descripcion, nombrepermiso, estado)
VALUES (2, 'Permisos estudiantes inactivos', 'est002', '01');
insert INTO permiso(
idpermiso, descripcion, nombrepermiso, estado)
VALUES (3, 'Permisos auxiliar para ingresar preguntas', 'est003', '01');
insert INTO permiso(
idpermiso, descripcion, nombrepermiso, estado)
VALUES (4, 'Permisos docente', 'doc001', '01');
insert INTO permiso(
idpermiso, descripcion, nombrepermiso, estado)
VALUES (5, 'Permisos preparador', 'doc002', '01');
insert INTO permiso(
idpermiso, descripcion, nombrepermiso, estado)
VALUES (6, 'Permisos administrador', 'admin001', '01');
insert INTO modulo(
codigomod, nombre, estado, descripcion)
VALUES (1, 'mod0001', 'activo', 'crear test de practica, simulacros de preparacion para estudiantes.');
insert INTO modulo(
codigomod, nombre, estado, descripcion)
VALUES (2, 'mod0002', 'activo', 'Cronograma de actividades');
insert INTO modulo(
codigomod, nombre, estado, descripcion)
VALUES (3, 'mod0003', 'activo', 'estadisticas');
insert INTO modulo(
codigomod, nombre, estado, descripcion)
VALUES (4, 'mod0004', 'activo', 'modulo de creacion de simulacros');
insert INTO modulo(
codigomod, nombre, estado, descripcion)
VALUES (5, 'mod0005', 'activo', 'gestion de usuarios');
insert INTO modulo(
codigomod, nombre, estado, descripcion)
VALUES (6, 'mod0006', 'activo', 'gestion de preguntas');
insert INTO modulo(
codigomod, nombre, estado, descripcion)
VALUES (7, 'mod0007', 'activo', 'gestion de roles');
insert INTO permisomodulo(
idpermisomod, codigomod, idpermiso)
VALUES (1, 1, 1);
insert INTO permisomodulo(
idpermisomod, codigomod, idpermiso)
VALUES (2, 2, 1);
insert INTO permisomodulo(
idpermisomod, codigomod, idpermiso)
VALUES (3, 3, 4);
insert INTO permisomodulo(
idpermisomod, codigomod, idpermiso)
VALUES (4, 6, 4);
insert INTO permisomodulo(
idpermisomod, codigomod, idpermiso)
VALUES (5, 4, 5);
insert INTO permisomodulo(
idpermisomod, codigomod, idpermiso)
VALUES (6, 5, 6);
insert INTO permisomodulo(
idpermisomod, codigomod, idpermiso)
VALUES (7, 7, 6);
insert INTO rol(
idrol, idpermiso, nombre, descripcion, estado)
VALUES (1,1, 'estudiante', 'rol de estudiantes en preparacion', '01');
insert INTO rol(
idrol, idpermiso, nombre, descripcion, estado)
VALUES (2, 4,'docente', 'rol de docente', '02');
insert INTO rol(
idrol, idpermiso, nombre, descripcion, estado)
VALUES (3,5, 'preparador', 'docente encargado de la preparcion de un grupo para las pruebas', '03');
insert INTO rol(
idrol, idpermiso, nombre, descripcion, estado)
VALUES (4,6, 'administrador', 'administrador del sistema', '04');
insert INTO rol(
idrol, idpermiso, nombre, descripcion, estado)
VALUES (5,3, 'escritor', 'encargado de ingresar preguntas', '05');
insert INTO perfil(
idperfil, idrol, descripcion, ultimoingreso, fechavencimiento, estado)
VALUES (1, 1, 'Alumno unicor', '2010-04-26', '2010-07-01', 'activo');
insert INTO perfil(
idperfil, idrol, descripcion, ultimoingreso, fechavencimiento, estado)
VALUES (2, 4, 'Admin sistema ecesis', '2010-04-26', '2010-07-01', 'activo');
insert INTO perfil(
idperfil, idrol, descripcion, ultimoingreso, fechavencimiento, estado)
VALUES (3, 2, 'Docente', '2010-04-26', '2010-07-01', 'activo');
insert INTO perfil(
idperfil, idrol, descripcion, ultimoingreso, fechavencimiento, estado)
VALUES (4, 3, 'Preparador', '2010-04-26', '2010-07-01', 'activo');
insert INTO usuario(
iduser, numeroid, idprog, tipoid, nombres, apellidos,direccion, telefono, sexo, fechanacimiento, email, usuario, clave)
VALUES (1, 123451, 1, 'CC', 'camilo', 'cervantes', 'la patagonia', '5555555', 'M', '1989-01-01', 'usuario1@mail.com', 'kamilin8931', '12345');
insert INTO usuario(
iduser, numeroid, idprog, tipoid, nombres, apellidos,direccion, telefono, sexo, fechanacimiento, email, usuario, clave)
VALUES (2, 123452, 1, 'CC', 'luis', 'cataño', 'el inframundo', '5555555', 'M', '1989-01-01', 'usuario2@mail.com', 'luchox25', '12345');
insert INTO usuario(
iduser, numeroid, idprog, tipoid, nombres, apellidos,direccion, telefono, sexo, fechanacimiento, email, usuario, clave)
VALUES (3, 123453, 1, 'CC', 'anny', 'almanza', 'algun lugar del mundo', '5555555', 'F', '1989-01-01', 'usuario3@mail.com', 'aalmanza', '12345');
insert INTO usuario(
iduser, numeroid, idprog, tipoid, nombres, apellidos,direccion, telefono, sexo, fechanacimiento, email, usuario, clave)
VALUES (4, 123454, 1, 'CC', 'Harold', 'Bula', 'Sahagun', '5555555', 'M', '1989-01-01', 'usuario4@mail.com', 'habula', '12345');
insert INTO usuarioperfil(
idperfil, iduser)
VALUES (1, 1);
insert INTO usuarioperfil(
idperfil, iduser)
VALUES (2, 2);
insert INTO usuarioperfil(
idperfil, iduser)
VALUES (3, 3);
insert INTO usuarioperfil(
idperfil, iduser)
VALUES (4, 4);
-- 9: evaluador
insert INTO simulacro(
idsimulacro, nombre, fechapublicacion, fechafinalizacion, duracion)
VALUES (1, 'simulacro1','2011-04-26', '2011-04-27', '01:00:00');
insert INTO usuariocreasimulacro(
iduser, idsimulacro)
VALUES (9, 1);
-- 8: docente
insert INTO pregunta(
idpregunta, iduser, idasignatura, tipo, contenido)
VALUES (1, 8, 1, 'tipopregunta1', 'pregunta1');
insert INTO pregunta(
idpregunta, iduser, idasignatura, tipo, contenido)
VALUES (2, 8, 1, 'tipopregunta2', 'pregunta2');
insert INTO pregunta(
idpregunta, iduser, idasignatura, tipo, contenido)
VALUES (3, 8, 1, 'tipopregunta3', 'pregunta3');
insert INTO pregunta(
idpregunta, iduser, idasignatura, tipo, contenido)
VALUES (4, 8, 1, 'tipopregunta4', 'pregunta4');
insert INTO pregunta(
idpregunta, iduser, idasignatura, tipo, contenido)
VALUES (5, 8, 1, 'tipopregunta5', 'pregunta5');
insert INTO pregunta(
idpregunta, iduser, idasignatura, tipo, contenido)
VALUES (6, 8, 2, 'tipopregunta6', 'pregunta6');
insert INTO pregunta(
idpregunta, iduser, idasignatura, tipo, contenido)
VALUES (7, 8, 2, 'tipopregunta7', 'pregunta7');
insert INTO pregunta(
idpregunta, iduser, idasignatura, tipo, contenido)
VALUES (8, 8, 2, 'tipopregunta8', 'pregunta8');
insert INTO pregunta(
idpregunta, iduser, idasignatura, tipo, contenido)
VALUES (9, 8, 2, 'tipopregunta9', 'pregunta9');
insert INTO pregunta(
idpregunta, iduser, idasignatura, tipo, contenido)
VALUES (10, 8, 2, 'tipopregunta10', 'pregunta10');
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (1, 1, 'opcion1a', TRUE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (2, 1, 'opcion1b', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (3, 1, 'opcion1c', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (4, 1, 'opcion1d', FALSE);
--
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (5, 2, 'opcion2a', TRUE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (6, 2, 'opcion2b', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (7, 2, 'opcion2c', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (8, 2, 'opcion2d', FALSE);
--
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (9, 3, 'opcion3a', TRUE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (10, 3, 'opcion3b', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (11, 3, 'opcion3c', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (12, 3, 'opcion3d', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (13, 4, 'opcion4a', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (14, 4, 'opcion4b', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (15, 4, 'opcion4c', TRUE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (16, 4, 'opcion4d', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (17, 5, 'opcion5a', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (18, 5, 'opcion5b', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (19, 5, 'opcion5c', TRUE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (20, 5, 'opcion5d', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (21, 6, 'opcion6a', TRUE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (22, 6, 'opcion6b', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (23, 6, 'opcion6c', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (24, 6, 'opcion6d', FALSE);
--
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (25, 7, 'opcion7a', TRUE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (26, 7, 'opcion7b', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (27, 7, 'opcion7c', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (28, 7, 'opcion7d', FALSE);
--
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (29, 8, 'opcion8a', TRUE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (30, 8, 'opcion8b', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (31, 8, 'opcion8c', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (32, 8, 'opcion8d', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (33, 9, 'opcion9a', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (34, 9, 'opcion9b', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (35, 9, 'opcion9c', TRUE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (36, 9, 'opcion9d', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (37, 10, 'opcion10a', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (38, 10, 'opcion10b', FALSE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (39,10, 'opcion10c', TRUE);
insert INTO respuesta(
idrespuesta, idpregunta, contenido, correcta)
VALUES (40, 10, 'opcion10d', FALSE);
insert INTO test(
idsimulacro, idpregunta, idrespuesta, idtest, horainicio, horafinalizacion)
VALUES (1, 1, 2, 1, '02:34:00', '03:34:00');
insert INTO test(
idsimulacro, idpregunta, idrespuesta, idtest, horainicio, horafinalizacion)
VALUES (1, 2, 5, 2, '02:34:00', '03:34:00');
insert INTO test(
idsimulacro, idpregunta, idrespuesta, idtest, horainicio, horafinalizacion)
VALUES (1, 3, 11, 3, '02:34:00', '03:34:00');
insert INTO test(
idsimulacro, idpregunta, idrespuesta, idtest, horainicio, horafinalizacion)
VALUES (1, 4, 13, 4, '02:34:00', '03:34:00');
insert INTO test(
idsimulacro, idpregunta, idrespuesta, idtest, horainicio, horafinalizacion)
VALUES (1, 5, 19, 5, '02:34:00', '03:34:00');
insert INTO test(
idsimulacro, idpregunta, idrespuesta, idtest, horainicio, horafinalizacion)
VALUES (1, 6, 22, 6, '02:34:00', '03:34:00');
insert INTO test(
idsimulacro, idpregunta, idrespuesta, idtest, horainicio, horafinalizacion)
VALUES (1, 7, 26, 7, '02:34:00', '03:34:00');
insert INTO test(
idsimulacro, idpregunta, idrespuesta, idtest, horainicio, horafinalizacion)
VALUES (1, 8, 30, 8, '02:34:00', '03:34:00');
insert INTO test(
idsimulacro, idpregunta, idrespuesta, idtest, horainicio, horafinalizacion)
VALUES (1, 9, 34, 9, '02:34:00', '03:34:00');
insert INTO test(
idsimulacro, idpregunta, idrespuesta, idtest, horainicio, horafinalizacion)
VALUES (1, 10, 38, 10, '02:34:00', '03:34:00');
insert INTO usuariosolucionatest(
idsolucion, idtest, iduser)
VALUES (1, 1, 1);
insert INTO usuariosolucionatest(
idsolucion, idtest, iduser)
VALUES (2, 2, 1);
insert INTO usuariosolucionatest(
idsolucion, idtest, iduser)
VALUES (3, 3, 1);
insert INTO usuariosolucionatest(
idsolucion, idtest, iduser)
VALUES (4, 4, 1);
insert INTO usuariosolucionatest(
idsolucion, idtest, iduser)
VALUES (5, 5, 1);
insert INTO usuariosolucionatest(
idsolucion, idtest, iduser)
VALUES (6, 6, 1);
insert INTO usuariosolucionatest(
idsolucion, idtest, iduser)
VALUES (7, 7, 1);
insert INTO usuariosolucionatest(
idsolucion, idtest, iduser)
VALUES (8, 8, 1);
insert INTO usuariosolucionatest(
idsolucion, idtest, iduser)
VALUES (9, 9, 1);
insert INTO usuariosolucionatest(
idsolucion, idtest, iduser)
VALUES (10, 10, 1);
|
/*
PSEUDO
PSEUDO COLUMN, 의사 컬럼
- 실제 컬럼은 아닌데 컬럼처럼 행동하는 객체
- 함수처럼 생각해도 된다.
ROWNUM
- 오라클 전용, MS-SQL(top), mySQL(limit)
- 행번호를 반환하는 컬럼
- 서브 쿼리에 많이 의존
- ROWNUM은 주로 FROM절이 호출될때 같이 실행된다.*****************
*/
SELECT *
FROM TBLCOUNTRY;
SELECT C.*,
ROWNUM
FROM TBLCOUNTRY C
-- WHERE CONTINENT='AS'
;
-- 질문의 조건에 1행이 포함되면 결과O, 포함 안되면 결과 X
select c.*, rownum
from tblcountry c
where rownum = 1;
SELECT C.*, ROWNUM
FROM TBLCOUNTRY C
WHERE ROWNUM <= 5;
SELECT C.*, ROWNUM
FROM TBLCOUNTRY C
WHERE ROWNUM = 5;
SELECT C.*, ROWNUM
FROM TBLCOUNTRY C
WHERE ROWNUM BETWEEN 3 AND 5;
-- 급여를 많이 받는 순으로 1~10등 구하기
SELECT NAME,
BASICPAY,
ROWNUM
FROM TBLINSA
ORDER BY BASICPAY DESC
;
SELECT NAME, BASICPAY, ROWNUM
FROM (SELECT NAME, BASICPAY --여기서 서브쿼리가 실행될때마다 FROM에서 ROWNUM을 생성
FROM TBLINSA
ORDER BY BASICPAY DESC)
WHERE ROWNUM <= 10
-- ORDER BY ROWNUM DESC
;
-- RNUM : 가운데 쿼리의 ROWNUM : 정적인 번호
-- ROWNUM : 바깥쪽 쿼리의 ROWNUM : 동적인 번호
SELECT NAME, BASICPAY, RNUM, ROWNUM
FROM (SELECT NAME, BASICPAY, ROWNUM AS RNUM
FROM (SELECT NAME,
BASICPAY
FROM TBLINSA
ORDER BY BASICPAY DESC))
WHERE RNUM BETWEEN 3 AND 5;
;
-- BASICPAY + SUDANG -> 급여 순위
SELECT NAME, SALARY, RNUM
FROM (
SELECT NAME, SALARY, ROWNUM AS RNUM
FROM (
SELECT NAME,
BASICPAY + SUDANG AS SALARY
FROM TBLINSA
ORDER BY SALARY DESC
)
)
WHERE RNUM BETWEEN 5 AND 10
;
-- 지역별(HOMETOWN) 거주자가 몇명?
SELECT *
FROM TBLADDRESSBOOK;
SELECT HOMETOWN,
COUNT(*)
FROM TBLADDRESSBOOK
GROUP BY HOMETOWN
ORDER BY COUNT(*) DESC
;
SELECT *
FROM (
SELECT HOMETOWN,
CNT,
ROWNUM AS RNUM
FROM (SELECT HOMETOWN,
COUNT(*) AS CNT
FROM TBLADDRESSBOOK
GROUP BY HOMETOWN
ORDER BY COUNT(*) DESC
)
)
WHERE RNUM BETWEEN 3 AND 5
;
-- 직업별 인원수 1~10, 11~20 TBL ADDRESSBOOK
SELECT *
FROM TBLADDRESSBOOK;
SELECT JOB, CNT, ROWNUM
FROM (
SELECT JOB,
COUNT(*) AS CNT
FROM TBLADDRESSBOOK
GROUP BY JOB
ORDER BY COUNT(*) DESC
)
WHERE ROWNUM BETWEEN 1 AND 10;
;
SELECT JOB, CNT, RNUM
FROM (
SELECT JOB, CNT, ROWNUM AS RNUM
FROM (
SELECT JOB,
COUNT(*) AS CNT
FROM TBLADDRESSBOOK
GROUP BY JOB
ORDER BY COUNT(*) DESC
)
)
WHERE RNUM BETWEEN 11 AND 20
; |
SELECT c.Name, COUNT(*) AS HotelCount FROM Hotels h
JOIN Cities c ON c.Id= h.CityId
GROUP BY c.Name
ORDER BY HotelCount DESC, c.Name
|
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 16, 2018 at 03:15 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `tubes`
--
-- --------------------------------------------------------
--
-- Table structure for table `akun`
--
CREATE TABLE `akun` (
`email` varchar(50) NOT NULL,
`pass` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `akun`
--
INSERT INTO `akun` (`email`, `pass`) VALUES
('alfisar@gmail.com', 'alfi'),
('alfisar589@gmail.com', 'alfisar'),
('alfisar123@gmail.com', 'alfi'),
('max@gmail.com', 'max');
-- --------------------------------------------------------
--
-- Table structure for table `barang`
--
CREATE TABLE `barang` (
`idbarang` varchar(10) NOT NULL,
`nama` varchar(35) NOT NULL,
`harga` int(11) NOT NULL,
`deskripsi` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `barang`
--
INSERT INTO `barang` (`idbarang`, `nama`, `harga`, `deskripsi`) VALUES
('pr-001', 'Amber Soap', 15, 'Lorem ipsum dolor sit amet consectetur'),
('pr-002', 'Arditi Backpack', 50, 'Lorem ipsum dolor sit amet consectetur'),
('pr-003', 'Blaster Orange Bag', 30, ' Lorem ipsum dolor sit amet consectetur'),
('pr-004', 'Canvas Basket', 10, 'Lorem ipsum dolor sit amet consectetur'),
('pr-005', 'Classic Chair', 62, 'Lorem ipsum dolor sit amet consectetur'),
('pr-006', 'Door Bumper', 29, 'Lorem ipsum dolor sit amet consectetur'),
('pr-007', 'Flower Candleholder', 10, 'Lorem ipsum dolor sit amet consectetur'),
('pr-008', 'Clueless Clock', 31, 'Lorem ipsum dolor sit amet consectetur'),
('pr-009', 'Hans Backpack', 50, 'Lorem ipsum dolor sit amet consectetur'),
('pr-010', 'Laptop Bag', 42, 'Lorem ipsum dolor sit amet consectetur'),
('pr-011', 'Lighthouse Lantern', 25, 'Lorem ipsum dolor sit amet consectetur'),
('pr-012', 'Pendulum Lamp', 5, 'Lorem ipsum dolor sit amet consectetur'),
('pr-013', 'Plain Glass Bottle', 22, 'Lorem ipsum dolor sit amet consectetur'),
('pr-014', 'Press Coffee Maker', 31, 'Lorem ipsum dolor sit amet consectetur'),
('pr-015', 'Savana Sunglasses', 19, 'Lorem ipsum dolor sit amet consectetur'),
('pr-016', 'Specs Sunglasses', 19, 'Lorem ipsum dolor sit amet consectetur'),
('pr-017', 'Rattan Basket', 13, 'Lorem ipsum dolor sit amet consectetur'),
('pr-018', 'Glassbottle', 14, 'Lorem ipsum dolor sit amet consectetur'),
('pr-019', 'Sachet', 20, 'Lorem ipsum dolor sit amet consectetur'),
('pr-020', 'Wood-tray', 23, 'Lorem ipsum dolor sit amet consectetur');
-- --------------------------------------------------------
--
-- Table structure for table `billing`
--
CREATE TABLE `billing` (
`user` varchar(30) NOT NULL,
`first` varchar(20) NOT NULL,
`last` varchar(20) NOT NULL,
`email` varchar(30) NOT NULL,
`province` varchar(20) NOT NULL,
`city` varchar(20) NOT NULL,
`district` varchar(20) NOT NULL,
`address` varchar(20) NOT NULL,
`zipcode` varchar(10) NOT NULL,
`phone` varchar(12) NOT NULL,
`namabarang` varchar(20) NOT NULL,
`harga` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `billing`
--
INSERT INTO `billing` (`user`, `first`, `last`, `email`, `province`, `city`, `district`, `address`, `zipcode`, `phone`, `namabarang`, `harga`) VALUES
('', 'alfi', 'asdsa', 'alfi@gmail.com', 'asdas', 'jakarta', 'sadsa', 'bogor', '14045', '081291276414', '', ''),
('', 'alfi', 'asdsa', 'alfi@gmail.com', 'asdas', 'jakarta', 'sadsa', 'bogor', '14045', '081291276414', '', ''),
('', 'alfi', 'asdsa', 'alfi@gamil.com', 'asdas', 'jakarta', 'sadsa', 'bogor', '14045', '081291276414', '', ''),
('', 'alfi', 'asdsa', 'alfi@gamil.com', 'asdas', 'jakarta', 'sadsa', 'bogor', '14045', '081291276414', '', ''),
('alfisar@gmail.com', 'alfi', 'sar', 'alfisar@gmail.com', 'asdas', 'jakarta', 'sadsa', 'bogor', '14045', '081291276414', 'Door Bumper', '47'),
('alfisar@gmail.com', 'alfi', 'sar', 'alfisar@gmail.com', 'asdas', 'jakarta', 'sadsa', 'bogor', '14045', '081291276414', 'Door Bumper', '38'),
('alfisar@gmail.com', 'alfi', 'sar', 'alfisar@gmail.com', 'jawa barat', 'bogor', 'bojong', 'bogor', '14045', '08888881238', 'Door Bumper', '29'),
('alfisar@gmail.com', 'alfi', 'sar', 'alfisar@gmail.com', 'jawa barat', 'bogor', 'bojong', 'bogor', '14045', '08888881238', 'Amber Soap', '33'),
('alfisar@gmail.com', 'alfi', 'sar', 'alfisar@gmail.com', 'jawa barat', 'bogor', 'bojong', 'bogor', '14045', '08888881238', 'Clueless Clock', '49');
-- --------------------------------------------------------
--
-- Table structure for table `comment`
--
CREATE TABLE `comment` (
`idproduk` varchar(10) NOT NULL,
`user` varchar(30) NOT NULL,
`comment` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `comment`
--
INSERT INTO `comment` (`idproduk`, `user`, `comment`) VALUES
('pr-002', 'alfisar@gmail.com', 'ini barangnya bagus banget gan'),
('pr-006', 'alfisar@gmail.com', 'gantungannya bagus banget '),
('pr-002', 'Unkown', 'bagus gan barangnya'),
('pr-014', 'alfisar@gmail.com', 'lucu tekonya '),
('pr-013', 'Unkown', 'kualitasnya bagus ini \r\n'),
('pr-002', 'Anonymous', 'Kualitas produknya sangat bagus dan pengiriman dengan packaging yang aman'),
('pr-002', 'Unkown', 'wdwd');
-- --------------------------------------------------------
--
-- Table structure for table `profile`
--
CREATE TABLE `profile` (
`user` varchar(30) NOT NULL,
`fname` varchar(10) NOT NULL,
`lname` varchar(10) NOT NULL,
`email` varchar(30) NOT NULL,
`province` varchar(20) NOT NULL,
`city` varchar(20) NOT NULL,
`district` varchar(20) NOT NULL,
`address` varchar(50) NOT NULL,
`zip` varchar(10) NOT NULL,
`phone` varchar(12) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `profile`
--
INSERT INTO `profile` (`user`, `fname`, `lname`, `email`, `province`, `city`, `district`, `address`, `zip`, `phone`) VALUES
('alfisar@gmail.com', 'alfi', 'sar', 'alfisar@gmail.com', 'jawa barat', 'bogor', 'bojong', 'bogor', '14045', '08888881238'),
('alfisar589@gmail.com', 'alfi', 'sar', 'alfisar589@gmail.com', 'jawa barat', 'bogor', 'bojong', 'bogor', '14045', '08888881238'),
('alfisar123@gmail.com', 'alfi', 'sarrrrrr', 'alfisar123@gmai.com', 'asdas', 'jakarta', 'sadsa', 'bogor', '14045', '081291276414');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `barang`
--
ALTER TABLE `barang`
ADD PRIMARY KEY (`idbarang`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/* Создание таблицы констант */
CREATE TABLE /*PREFIX*/CONSTS
(
NAME VARCHAR(100) NOT NULL,
DESCRIPTION VARCHAR(250),
VALUE LONGBLOB NOT NULL,
PRIMARY KEY (NAME)
)
--
/* Создание просмотра таблицы констант */
CREATE VIEW /*PREFIX*/S_CONSTS
AS
SELECT * FROM /*PREFIX*/CONSTS
--
/* Создание процедуры добавления константы */
CREATE PROCEDURE /*PREFIX*/I_CONST
(
IN NAME VARCHAR(100),
IN DESCRIPTION VARCHAR(250),
IN VALUE LONGBLOB
)
BEGIN
INSERT INTO /*PREFIX*/CONSTS (NAME,DESCRIPTION,VALUE)
VALUES (NAME,DESCRIPTION,VALUE);
END;
--
/* Создание процедуры изменения константы */
CREATE PROCEDURE /*PREFIX*/U_CONST
(
IN NAME VARCHAR(100),
IN DESCRIPTION VARCHAR(250),
IN VALUE LONGBLOB,
IN OLD_NAME VARCHAR(100)
)
BEGIN
UPDATE /*PREFIX*/CONSTS C
SET C.NAME=NAME,
C.DESCRIPTION=DESCRIPTION,
C.VALUE=VALUE
WHERE C.NAME=OLD_NAME;
END;
--
/* Создание процедуры удаления константы */
CREATE PROCEDURE /*PREFIX*/D_CONST
(
IN OLD_NAME VARCHAR(100)
)
BEGIN
DELETE FROM /*PREFIX*/CONSTS
WHERE NAME=OLD_NAME;
END;
-- |
SELECT
users.user_id, user_first_name, user_last_name, user_birth_date, user_email, user_profile_img, isstreamer
FROM users
INNER JOIN applications ON applications.user_id = users.user_id
WHERE users.user_id = $1 |
CREATE DATABASE IF NOT EXISTS `contable` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `contable`;
-- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: contable
-- ------------------------------------------------------
-- Server version 5.1.73-community
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `movimi`
--
DROP TABLE IF EXISTS `movimi`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `movimi` (
`idmovimi` int(11) NOT NULL AUTO_INCREMENT,
`documento` varchar(10) NOT NULL,
`idcentro` int(3) DEFAULT NULL,
`idcompania` int(3) NOT NULL,
`idasiento` int(11) NOT NULL,
`idmes` int(11) NOT NULL,
`anio` varchar(4) NOT NULL,
`fecha` datetime NOT NULL,
`codicomp` int(11) NOT NULL,
`cuenta` varchar(12) NOT NULL,
`idnit` int(11) DEFAULT NULL,
`cheque` varchar(8) DEFAULT NULL,
`descrip` varchar(55) NOT NULL,
`valorcredito` decimal(20,2) NOT NULL,
`valordebito` decimal(20,2) NOT NULL,
`imprime` bit(1) NOT NULL,
`usuario` int(11) NOT NULL,
`fechagraba` datetime NOT NULL,
`actualizado` bit(1) NOT NULL,
`usuarioactu` int(11) DEFAULT NULL,
`fechaactualiz` datetime DEFAULT NULL,
`asientofijo` bit(1) NOT NULL,
PRIMARY KEY (`idmovimi`),
KEY `fk_centro_idx` (`idcentro`),
KEY `fk_compania_idx` (`idcompania`),
KEY `fk_comprobante_idx` (`codicomp`),
KEY `fk_cuentamov_idx` (`cuenta`),
KEY `fk_usuarioguard_idx` (`usuario`),
KEY `fk_nitmovi_idx` (`idnit`),
KEY `fk_mesmov_idx` (`idmes`),
CONSTRAINT `fk_centromov` FOREIGN KEY (`idcentro`) REFERENCES `centro` (`idcentro`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_companiamov` FOREIGN KEY (`idcompania`) REFERENCES `compania` (`idcompania`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_comprobante` FOREIGN KEY (`codicomp`) REFERENCES `comprobante` (`codicomp`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_cuentamov` FOREIGN KEY (`cuenta`) REFERENCES `maeconta` (`cuenta`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_mesmovim` FOREIGN KEY (`idmes`) REFERENCES `mes` (`idmes`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_nitsmovi` FOREIGN KEY (`idnit`) REFERENCES `maenits` (`idnit`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_usuariogu` FOREIGN KEY (`usuario`) REFERENCES `usuario` (`idusuario`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='Movimientos de Asientos Contables';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `movimi`
--
LOCK TABLES `movimi` WRITE;
/*!40000 ALTER TABLE `movimi` DISABLE KEYS */;
INSERT INTO `movimi` VALUES (3,'1',1,1,1,1,'2014','2014-07-09 19:13:35',1,'11050505',6,'1','1',-10000.00,0.00,'\0',1,'2014-07-09 19:15:43','\0',NULL,'0001-01-01 00:00:00','\0'),(4,'1',1,1,1,1,'2014','2014-07-09 19:13:35',1,'110506',6,'1','11',0.00,10000.00,'\0',1,'2014-07-09 19:15:43','\0',NULL,'0001-01-01 00:00:00','\0'),(5,'2',10,1,1,7,'2014','2014-07-10 07:19:44',1,'110506',6,'1','PAGOS',0.00,1000000.00,'\0',1,'2014-07-10 07:21:01','\0',NULL,'0001-01-01 00:00:00','\0'),(6,'2',1,1,1,7,'2014','2014-07-10 07:19:44',1,'413526',6,'1','VENTA',-1000000.00,0.00,'\0',1,'2014-07-10 07:21:01','\0',NULL,'0001-01-01 00:00:00','\0'),(7,'3',10,1,1,1,'2014','2014-07-10 07:24:04',1,'110506',1,'1','PAGO',-1500000.00,0.00,'\0',1,'2014-07-10 07:25:09','\0',NULL,'0001-01-01 00:00:00','\0'),(8,'3',10,1,1,1,'2014','2014-07-10 07:24:04',1,'61352601',9,'1','VENTA',0.00,1500000.00,'\0',1,'2014-07-10 07:25:09','\0',NULL,'0001-01-01 00:00:00','\0');
/*!40000 ALTER TABLE `movimi` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2015-02-04 13:33:01
|
drop table sondereinheit;
select * from einheit;
drop table unterrichtet;
Drop table einheit;
drop table lehrer;
drop table wiederholen;
drop table termin;
CREATE TABLE einheit (
einheitID bigint primary key GENERATED BY DEFAULT AS IDENTITY,
name VARCHAR(30) UNIQUE NOT NULL,
tag VARCHAR(30),
stunde NUMERIC(2),
raum VARCHAR(30),
notizen VARCHAR(3000)
);
CREATE TABLE lehrer (
nachname VARCHAR(30) NOT NULL,
vorname VARCHAR(30) NOT NULL,
lehrerID bigint primary key GENERATED BY DEFAULT AS IDENTITY
);
CREATE TABLE sondereinheit (
sID bigint primary key GENERATED BY DEFAULT AS IDENTITY,
sondereinheitID NUMERIC NOT NULL,
beschreibung VARCHAR(30) NOT NULL,
datum DATE NOT NULL,
s_einheitID bigint NOT NULL
);
CREATE TABLE termin (
titel VARCHAR(30) NOT NULL,
"Start" DATE NOT NULL,
ende DATE,
ort VARCHAR(30),
benachrichtigung NUMERIC(4),
beschreibung VARCHAR(2000),
terminID bigint primary key GENERATED BY DEFAULT AS IDENTITY
);
CREATE TABLE unterrichtet (
einheitID bigint NOT NULL,
lehrerID bigint NOT NULL
);
ALTER TABLE unterrichtet ADD CONSTRAINT unterrichtet_pk PRIMARY KEY ( einheitID,
lehrerID );
CREATE TABLE wiederholen (
taeglich CHAR(1),
woechentlich CHAR(1),
monatlich CHAR(1),
jaehrlich CHAR(1),
terminID bigint NOT NULL
);
ALTER TABLE sondereinheit
ADD CONSTRAINT sondereinheit_einheit_fk FOREIGN KEY ( s_einheitID )
REFERENCES einheit ( einheitID );
ALTER TABLE unterrichtet
ADD CONSTRAINT unterrichtet_einheit_fk FOREIGN KEY ( einheitID )
REFERENCES einheit ( einheitID )
ON DELETE CASCADE;
ALTER TABLE unterrichtet
ADD CONSTRAINT unterrichtet_lehrer_fk FOREIGN KEY ( lehrerID )
REFERENCES lehrer ( lehrerID );
ALTER TABLE wiederholen
ADD CONSTRAINT wiederholen_termin_fk FOREIGN KEY ( terminID )
REFERENCES termin ( terminID );
|
Create Procedure mERP_SP_InsertSchemeItemScope
(
@SchemeID int,
@Category nVarchar(4000)=NULL,
@SubCategory nVarchar(4000)=NULL,
@MSKU nVarchar(4000) =NULL,
@SKU nVarchar(4000)=NULL
)
As
If (IsNull(@Category,'') = '')
Set @Category = 'ALL'
If (IsNull(@SubCategory,'') = '')
Set @SubCategory = 'ALL'
If (IsNull(@MSKU,'') = '')
Set @MSKU = 'ALL'
If (IsNull(@SKU,'') = '')
Set @SKU = 'ALL'
Insert Into tbl_mERP_RecdSchProductScope(CS_SchemeID, CS_Category, CS_SubCategory, CS_MarketSKU, CS_SKUCode )
values(@SchemeID, @Category, @SubCategory, @MSKU, @SKU)
|
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 21, 2018 at 09:45 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_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `bma_hrims`
--
CREATE DATABASE IF NOT EXISTS `bma_hrims` DEFAULT CHARACTER SET utf8 COLLATE utf8_persian_ci;
USE `bma_hrims`;
-- --------------------------------------------------------
--
-- Table structure for table `branch`
--
CREATE TABLE `branch` (
`branch_id` char(20) COLLATE utf8_persian_ci NOT NULL,
`branch_name` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`branch_city` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`branch_manager` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Dumping data for table `branch`
--
INSERT INTO `branch` (`branch_id`, `branch_name`, `branch_city`, `branch_manager`) VALUES
('bma-KTS-br', 'Kota-e-Sange', 'Kabul', NULL),
('bma-main-br', 'main branch', 'Kabul', NULL),
('bma-pulkh-br', 'Pulkhumry', 'Pulkhumry', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `computer_change`
--
CREATE TABLE `computer_change` (
`comp_change_id` int(11) NOT NULL,
`emp_id` int(11) DEFAULT NULL,
`ncomp_name` varchar(20) COLLATE utf8_persian_ci NOT NULL,
`ncomp_mac` varchar(20) COLLATE utf8_persian_ci NOT NULL,
`nuser_name` varchar(20) COLLATE utf8_persian_ci NOT NULL,
`reason` varchar(200) COLLATE utf8_persian_ci NOT NULL,
`change_date` date NOT NULL,
`mgr_id` int(11) DEFAULT NULL,
`mgr_status` tinyint(1) DEFAULT NULL,
`sysadmin` int(11) DEFAULT NULL,
`sysadmin_status` tinyint(1) DEFAULT NULL,
`notity` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `department`
--
CREATE TABLE `department` (
`dept_id` int(11) NOT NULL,
`dept_name` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`dept_manager` int(11) DEFAULT NULL,
`dept_head` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Dumping data for table `department`
--
INSERT INTO `department` (`dept_id`, `dept_name`, `dept_manager`, `dept_head`) VALUES
(1, 'Human Resource ', 1, NULL),
(2, 'IT', 3, NULL),
(3, 'Finance & Accounting ', NULL, NULL),
(4, 'Investment', NULL, NULL),
(5, 'Compliance ', NULL, NULL),
(6, 'Document & Relation', NULL, NULL),
(7, 'Purchase & Logistic ', NULL, NULL),
(8, 'Risk Managment', NULL, NULL),
(9, 'Internal Audit', NULL, NULL),
(10, 'Operation', NULL, NULL),
(11, 'Branches', NULL, NULL),
(12, 'Real Estate', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `domain_user`
--
CREATE TABLE `domain_user` (
`emp_id` int(11) NOT NULL,
`comp_name` varchar(20) COLLATE utf8_persian_ci NOT NULL,
`comp_mac` varchar(20) COLLATE utf8_persian_ci NOT NULL,
`new_comp_ip` varchar(20) COLLATE utf8_persian_ci NOT NULL,
`mgr_id` int(11) DEFAULT NULL,
`sysadmin_id` int(11) DEFAULT NULL,
`domain_user_date` date NOT NULL,
`domain_user_name` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`notify` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `employee`
--
CREATE TABLE `employee` (
`emp_id` int(11) NOT NULL,
`emp_gname` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_lastname` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_fname` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_gfname` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_dob` date NOT NULL,
`emp_pob` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`emp_gender` tinyint(1) DEFAULT NULL,
`emp_desig` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_salary` int(11) NOT NULL,
`emp_phoneNo` char(10) COLLATE utf8_persian_ci NOT NULL,
`emp_emailAdd` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`emp_profilePic` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`emp_sigature` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`emp_Tazkera` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_accountn` int(24) DEFAULT NULL,
`emp_Pvillage` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_Pdistrict` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_Pprovince` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_Tvillage` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_Tdistrict` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_Tprovince` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_DOJ` date NOT NULL,
`emp_DOR` date DEFAULT NULL,
`emp_type` tinyint(1) NOT NULL,
`emp_branch_id` char(20) COLLATE utf8_persian_ci NOT NULL,
`emp_mgr` int(11) DEFAULT NULL,
`emp_dep` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Dumping data for table `employee`
--
INSERT INTO `employee` (`emp_id`, `emp_gname`, `emp_lastname`, `emp_fname`, `emp_gfname`, `emp_dob`, `emp_pob`, `emp_gender`, `emp_desig`, `emp_salary`, `emp_phoneNo`, `emp_emailAdd`, `emp_profilePic`, `emp_sigature`, `emp_Tazkera`, `emp_accountn`, `emp_Pvillage`, `emp_Pdistrict`, `emp_Pprovince`, `emp_Tvillage`, `emp_Tdistrict`, `emp_Tprovince`, `emp_DOJ`, `emp_DOR`, `emp_type`, `emp_branch_id`, `emp_mgr`, `emp_dep`) VALUES
(1, 'Fazluddin', 'Faayez', 'Sayed Ali', 'Sher Ali', '1992-04-02', 'Ostar Jangle ', 1, 'IT Officer', 20000, '0798270584', 'fazluddin.fayez@gmail.com', NULL, NULL, '204095', 1234759573, 'Ostarjangle ', 'Doshi', 'Baghlan', 'Pulkhumry', 'second', 'Baghlan', '2018-06-06', NULL, 1, 'bma-main-br', NULL, 2),
(2, 'Farddin', 'omari', 'Sayeed Ali ', 'Rustam ', '2016-02-17', 'Kabul', 1, 'Risk Officer ', 1000, '0795365214', 'farddin.omari@gmail.com', NULL, NULL, '24504200', NULL, 'QARA BAGH', 'QARAB BAGH', 'Kabul', 'Taimany', 'Kabul', 'Kabul', '2018-05-10', NULL, 0, 'bma-main-br', 1, 8),
(3, 'Adbul Raqib', 'Saqeeb', 'Mohammad Amin', 'Mohammad Agha', '1990-07-11', 'Paghman', 1, 'Journalist', 10000, '0795651245', 'raqib.saqeeb@gmail.com', NULL, NULL, '14562055', NULL, 'Khal Dari ', 'Paghman', 'Kabul', 'Campany', 'Kabul', 'Kabul', '2017-09-13', NULL, 1, 'bma-KTS-br', 1, 10),
(5, 'ahmad', 'ahmadi', 'shir ali', 'shi Ahmad', '2014-02-02', 'Doshi', 1, 'RiskManager', 34000, '0798345687', 'ahamd@gmail.com', 'IMG/dweer/sd', 'IMG/sing/34', '345698', NULL, 'Doshi', 'Baghlan', 'Pulkhumry', 'Kapisa', 'parawan', 'Jabolsarj', '2014-07-06', NULL, 1, 'bma-main-br', 2, 4),
(8, 'faayez', 'ahamdi ', 'sayed ali ', 'abc', '0000-00-00', 'Taimani', 1, 'supervisor', 25000, '0798200300', 'faayez.ahmadi@gmail.om', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '40890938', NULL, 'Taimani', 'kabul', 'kabul', 'Sepesta', 'Doshi', 'Baghlan', '0000-00-00', NULL, 0, 'bma-main-br', 3, 2),
(9, 'farid', 'ahamdi ', 'jawad', 'karim', '1995-06-09', 'Doshi', 0, 'IT trainee', 10000, '0798200300', 'ahamd@gmail.com', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '40890938', NULL, 'AF', 'AG', 'AH', 'AB', 'AC', 'AD', '0000-00-00', NULL, 1, 'bma-KTS-br', 3, 2);
--
-- Triggers `employee`
--
DELIMITER $$
CREATE TRIGGER `delete_employee` BEFORE DELETE ON `employee` FOR EACH ROW insert into employee_track_change
values(
current_user(),
now(),
'delete',
old.emp_id,
old.emp_gname,
old.emp_lastname,
old.emp_fname ,
old.emp_gfname,
old.emp_dob ,
old.emp_pob ,
old.emp_gender ,
old.emp_desig ,
old.emp_salary ,
old.emp_phoneNo ,
old.emp_emailAdd,
old.emp_profilePic,
old.emp_sigature ,
old.emp_Tazkera ,
old.emp_accountn ,
old.emp_Pvillage ,
old.emp_Pdistrict ,
old.emp_Pprovince ,
old.emp_Tvillage ,
old.emp_Tdistrict ,
old.emp_Tprovince,
old.emp_DOJ,
old.emp_DOR ,
old.emp_type,
old.emp_branch_id,
old.emp_mgr,
old.emp_dep )
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `emp_salary_update` BEFORE UPDATE ON `employee` FOR EACH ROW insert into employee_track_change
values(
current_user(),
now(),
'update',
old.emp_id,
old.emp_gname,
old.emp_lastname,
old.emp_fname ,
old.emp_gfname,
old.emp_dob ,
old.emp_pob ,
old.emp_gender ,
old.emp_desig ,
old.emp_salary ,
old.emp_phoneNo ,
old.emp_emailAdd,
old.emp_profilePic,
old.emp_sigature ,
old.emp_Tazkera ,
old.emp_accountn ,
old.emp_Pvillage ,
old.emp_Pdistrict ,
old.emp_Pprovince ,
old.emp_Tvillage ,
old.emp_Tdistrict ,
old.emp_Tprovince,
old.emp_DOJ,
old.emp_DOR ,
old.emp_type,
old.emp_branch_id,
old.emp_mgr,
old.emp_dep )
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `new_emp_insertion` AFTER INSERT ON `employee` FOR EACH ROW insert into employee_track_change
values(
current_user(),
now(),
'insert',
new.emp_id,
new.emp_gname,
new.emp_lastname,
new.emp_fname ,
new.emp_gfname,
new.emp_dob ,
new.emp_pob ,
new.emp_gender ,
new.emp_desig ,
new.emp_salary ,
new.emp_phoneNo ,
new.emp_emailAdd,
new.emp_profilePic,
new.emp_sigature ,
new.emp_Tazkera ,
new.emp_accountn ,
new.emp_Pvillage ,
new.emp_Pdistrict ,
new.emp_Pprovince ,
new.emp_Tvillage ,
new.emp_Tdistrict ,
new.emp_Tprovince,
new.emp_DOJ,
new.emp_DOR ,
new.emp_type,
new.emp_branch_id,
new.emp_mgr,
new.emp_dep )
$$
DELIMITER ;
-- --------------------------------------------------------
--
-- Table structure for table `employee_advance_salary`
--
CREATE TABLE `employee_advance_salary` (
`advan_salary_id` int(11) NOT NULL,
`emp_id` int(11) NOT NULL,
`amount` int(11) NOT NULL,
`apply_date` date NOT NULL,
`dos_f` date NOT NULL,
`dos_t` date NOT NULL,
`fmgr_id` int(11) DEFAULT NULL,
`fmgr_status` tinyint(1) DEFAULT NULL,
`empg1_id` int(11) DEFAULT NULL,
`empg1_status` tinyint(1) DEFAULT NULL,
`empg2_id` int(11) DEFAULT NULL,
`empg2_status` tinyint(1) DEFAULT NULL,
`status` tinyint(1) DEFAULT NULL,
`notify` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `employee_attendance`
--
CREATE TABLE `employee_attendance` (
`at_id` int(11) NOT NULL,
`emp_id` int(11) NOT NULL,
`at_day` int(11) NOT NULL,
`at_month` int(11) NOT NULL,
`at_year` year(4) NOT NULL,
`at_singin_time` time NOT NULL,
`at_singout_time` time DEFAULT NULL,
`at_status` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Triggers `employee_attendance`
--
DELIMITER $$
CREATE TRIGGER `emp_attendance_change` BEFORE UPDATE ON `employee_attendance` FOR EACH ROW insert into emp_attendance_Track_change
values(
current_user(),
now(),
'update',
old.at_id,
old.emp_id,
old.at_day ,
old.at_month,
old.at_year ,
old.at_singin_time ,
old.at_singout_time ,
old.at_status)
$$
DELIMITER ;
-- --------------------------------------------------------
--
-- Table structure for table `employee_contract`
--
CREATE TABLE `employee_contract` (
`emp_contract_id` int(11) NOT NULL,
`emp_id` int(11) NOT NULL,
`emp_contract_F` date NOT NULL,
`emp_contract_T` date NOT NULL,
`reason` varchar(150) COLLATE utf8_persian_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `employee_overtime`
--
CREATE TABLE `employee_overtime` (
`emp_id` int(11) NOT NULL,
`overtime_hr` int(11) NOT NULL,
`overtime_rate` float NOT NULL,
`overtime_date` date DEFAULT NULL,
`over_document` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `employee_track_change`
--
CREATE TABLE `employee_track_change` (
`user_commit` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`insert_date` datetime DEFAULT NULL,
`action` varchar(15) COLLATE utf8_persian_ci NOT NULL,
`emp_id` int(11) DEFAULT NULL,
`emp_gname` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_lastname` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_fname` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_gfname` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_dob` date NOT NULL,
`emp_pob` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`emp_gender` tinyint(1) DEFAULT NULL,
`emp_desig` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_salary` int(11) NOT NULL,
`emp_phoneNo` char(10) COLLATE utf8_persian_ci NOT NULL,
`emp_emailAdd` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`emp_profilePic` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`emp_sigature` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`emp_Tazkera` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_accountn` int(24) DEFAULT NULL,
`emp_Pvillage` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_Pdistrict` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_Pprovince` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_Tvillage` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_Tdistrict` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_Tprovince` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`emp_DOJ` date NOT NULL,
`emp_DOR` date DEFAULT NULL,
`emp_type` tinyint(1) NOT NULL,
`emp_branch_id` char(20) COLLATE utf8_persian_ci NOT NULL,
`emp_mgr` int(11) NOT NULL,
`emp_dep` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Dumping data for table `employee_track_change`
--
INSERT INTO `employee_track_change` (`user_commit`, `insert_date`, `action`, `emp_id`, `emp_gname`, `emp_lastname`, `emp_fname`, `emp_gfname`, `emp_dob`, `emp_pob`, `emp_gender`, `emp_desig`, `emp_salary`, `emp_phoneNo`, `emp_emailAdd`, `emp_profilePic`, `emp_sigature`, `emp_Tazkera`, `emp_accountn`, `emp_Pvillage`, `emp_Pdistrict`, `emp_Pprovince`, `emp_Tvillage`, `emp_Tdistrict`, `emp_Tprovince`, `emp_DOJ`, `emp_DOR`, `emp_type`, `emp_branch_id`, `emp_mgr`, `emp_dep`) VALUES
('root@localhost', '2018-10-20 21:06:45', 'insert', 4, 'Mursal', 'Ahmadi', 'Sayed Tareq ', 'Sayed Mozafar', '1998-10-02', 'Doshi', 0, 'Customer Service Officer', 20000, '079653256', 'mursal.ahamdi@yahoo.com', NULL, NULL, '124560', 1245896350, 'Kalan Kozar', 'Doshi', 'Baghlan', 'Pulkhumry', 'Pulkhumry', 'Baghaln', '2015-10-15', NULL, 0, 'bma-pulkh-br', 2, 6),
('root@localhost', '2018-10-24 14:53:19', 'insert', 5, 'ahmad', 'ahmadi', 'shir ali', 'shi Ahmad', '2014-02-02', 'Doshi', 1, 'RiskManager', 34000, '0798345687', 'ahamd@gmail.com', 'IMG/dweer/sd', 'IMG/sing/34', '345698', NULL, 'Doshi', 'Baghlan', 'Pulkhumry', 'Kapisa', 'parawan', 'Jabolsarj', '2014-07-06', NULL, 1, 'bma-main-br', 2, 4),
('root@localhost', '2018-10-24 15:18:57', 'insert', 6, 'ahmad', 'ahmadi', 'shir ali', 'shi Ahmad', '2014-02-02', 'Doshi', 1, 'RiskManager', 34000, '0798345687', 'ahamd@gmail.com', 'IMG/dweer/sd', 'IMG/sing/34', '345698', NULL, 'Doshi', 'Baghlan', 'Pulkhumry', 'Kapisa', 'parawan', 'Jabolsarj', '2014-07-06', NULL, 1, 'bma-main-br', 2, 4),
('root@localhost', '2018-10-24 15:22:37', 'insert', 7, 'Farid', 'ahmadi', 'Zafar', 'shi Ahmad', '2014-02-02', 'Doshi', 1, 'Audit Officer', 36000, '0798565687', 'ahamd@gmail.com', 'IMG/dweer/sd', 'IMG/sing/34', '345398', NULL, 'Doshi', 'Baghlan', 'Pulkhumry', 'Kapisa', 'parawan', 'Jabolsarj', '2014-07-06', NULL, 1, 'bma-main-br', 2, 4),
('root@localhost', '2018-10-24 15:30:41', 'insert', 8, 'ahmad', 'ahamdi ', 'Sharif', 'Sharif Ahmad', '1995-06-09', 'Doshi', 1, 'IT Officer', 45000, '0798200300', 'ahamd@gmail.com', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '40890938', NULL, 'kabul', 'kabul', 'kabul', 'Doshi', 'tatabarak', 'Baghlan', '2014-06-08', '0000-00-00', 1, 'bma-KTS-br', 1, 1),
('root@localhost', '2018-10-24 15:54:13', 'delete', 7, 'Farid', 'ahmadi', 'Zafar', 'shi Ahmad', '2014-02-02', 'Doshi', 1, 'Audit Officer', 36000, '0798565687', 'ahamd@gmail.com', 'IMG/dweer/sd', 'IMG/sing/34', '345398', NULL, 'Doshi', 'Baghlan', 'Pulkhumry', 'Kapisa', 'parawan', 'Jabolsarj', '2014-07-06', NULL, 1, 'bma-main-br', 2, 4),
('root@localhost', '2018-10-24 15:59:23', 'delete', 8, 'ahmad', 'ahamdi ', 'Sharif', 'Sharif Ahmad', '1995-06-09', 'Doshi', 1, 'IT Officer', 45000, '0798200300', 'ahamd@gmail.com', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '40890938', NULL, 'kabul', 'kabul', 'kabul', 'Doshi', 'tatabarak', 'Baghlan', '2014-06-08', '0000-00-00', 1, 'bma-KTS-br', 1, 1),
('root@localhost', '2018-10-24 16:01:39', 'insert', 9, 'ahmad', 'ahamdi ', 'Sharif', 'Sharif Ahmad', '1995-06-09', 'Doshi', 1, 'IT Officer', 45000, '0798200400', 'ahamd23@gmail.com', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '4532323', NULL, 'kabul', 'kabul', 'kabul', 'Doshi', 'tatabarak', 'Baghlan', '2014-06-08', '0000-00-00', 1, 'bma-KTS-br', 1, 1),
('root@localhost', '2018-10-24 16:03:37', 'delete', 9, 'ahmad', 'ahamdi ', 'Sharif', 'Sharif Ahmad', '1995-06-09', 'Doshi', 1, 'IT Officer', 45000, '0798200400', 'ahamd23@gmail.com', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '4532323', NULL, 'kabul', 'kabul', 'kabul', 'Doshi', 'tatabarak', 'Baghlan', '2014-06-08', '0000-00-00', 1, 'bma-KTS-br', 1, 1),
('root@localhost', '2018-10-24 16:04:34', 'insert', 10, 'ahmad', 'ahamdi ', 'Sharif', 'Sharif Ahmad', '1995-06-09', 'Doshi', 1, 'IT Officer', 45000, '0798200400', 'ahamd23@gmail.com', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '4532323', NULL, 'kabul', 'kabul', 'kabul', 'Doshi', 'tatabarak', 'Baghlan', '2014-06-08', '0000-00-00', 1, 'bma-KTS-br', 1, 1),
('root@localhost', '2018-10-24 16:05:08', 'insert', 11, 'ahmad', 'ahamdi ', 'Sharif', 'Sharif Ahmad', '1995-06-09', 'Doshi', 1, 'IT Officer', 45000, '0798200400', 'ahamd23@gmail.com', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '4532323', NULL, 'kabul', 'kabul', 'kabul', 'Doshi', 'tatabarak', 'Baghlan', '2014-06-08', '0000-00-00', 1, 'bma-KTS-br', 1, 1),
('root@localhost', '2018-10-30 10:51:22', 'delete', 11, 'ahmad', 'ahamdi ', 'Sharif', 'Sharif Ahmad', '1995-06-09', 'Doshi', 1, 'IT Officer', 45000, '0798200400', 'ahamd23@gmail.com', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '4532323', NULL, 'kabul', 'kabul', 'kabul', 'Doshi', 'tatabarak', 'Baghlan', '2014-06-08', '0000-00-00', 1, 'bma-KTS-br', 1, 1),
('root@localhost', '2018-10-30 10:52:56', 'delete', 10, 'ahmad', 'ahamdi ', 'Sharif', 'Sharif Ahmad', '1995-06-09', 'Doshi', 1, 'IT Officer', 45000, '0798200400', 'ahamd23@gmail.com', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '4532323', NULL, 'kabul', 'kabul', 'kabul', 'Doshi', 'tatabarak', 'Baghlan', '2014-06-08', '0000-00-00', 1, 'bma-KTS-br', 1, 1),
('root@localhost', '2018-10-30 10:55:33', 'delete', 4, 'Mursal', 'Ahmadi', 'Sayed Tareq ', 'Sayed Mozafar', '1998-10-02', 'Doshi', 0, 'Customer Service Officer', 20000, '079653256', 'mursal.ahamdi@yahoo.com', NULL, NULL, '124560', 1245896350, 'Kalan Kozar', 'Doshi', 'Baghlan', 'Pulkhumry', 'Pulkhumry', 'Baghaln', '2015-10-15', NULL, 0, 'bma-pulkh-br', 2, 6),
('root@localhost', '2018-11-02 13:50:49', 'delete', 6, 'ahmad', 'ahmadi', 'shir ali', 'shi Ahmad', '2014-02-02', 'Doshi', 1, 'RiskManager', 34000, '0798345687', 'ahamd@gmail.com', 'IMG/dweer/sd', 'IMG/sing/34', '345698', NULL, 'Doshi', 'Baghlan', 'Pulkhumry', 'Kapisa', 'parawan', 'Jabolsarj', '2014-07-06', NULL, 1, 'bma-main-br', 2, 4),
('root@localhost', '2018-11-16 14:42:21', 'update', 3, 'Adbul Raqib', 'Saqeeb', 'Mohammad Amin', 'Mohammad Agha', '1990-07-11', 'Paghman', 1, 'Journalist', 140000, '0795651245', 'raqib.saqeeb@gmail.com', NULL, NULL, '14562055', NULL, 'Khal Dari ', 'Paghman', 'Kabul', 'Campany', 'Kabul', 'Kabul', '2017-09-13', NULL, 1, 'bma-KTS-br', 1, 10),
('root@localhost', '2018-11-17 12:17:34', 'insert', 8, 'faayez', 'ahamdi ', 'sayed ali ', 'abc', '0000-00-00', 'Taimani', 1, 'supervisor', 25000, '0798200300', 'faayez.ahmadi@gmail.om', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '40890938', NULL, 'Taimani', 'kabul', 'kabul', 'Sepesta', 'Doshi', 'Baghlan', '0000-00-00', NULL, 0, 'bma-main-br', 3, 2),
('root@localhost', '2018-11-17 15:09:18', 'insert', 9, 'farid', 'ahamdi ', 'jawad', 'karim', '1995-06-09', 'Doshi', 0, 'IT trainee', 10000, '0798200300', 'ahamd@gmail.com', 'photo/IMG_20160826_124333.jpg', 'signature/IMG_20160826_124337.jpg', '40890938', NULL, 'AF', 'AG', 'AH', 'AB', 'AC', 'AD', '0000-00-00', NULL, 1, 'bma-KTS-br', 3, 2);
-- --------------------------------------------------------
--
-- Table structure for table `employee_transfer`
--
CREATE TABLE `employee_transfer` (
`emp_transfer_id` int(11) NOT NULL,
`emp_id` int(11) NOT NULL,
`dept_id` int(11) NOT NULL,
`branch_id` char(20) COLLATE utf8_persian_ci NOT NULL,
`transfer_type` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`salary` int(11) NOT NULL,
`position` int(11) NOT NULL,
`DOS` date NOT NULL,
`DOE` date DEFAULT NULL,
`document` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`status` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `emp_attendance_track_change`
--
CREATE TABLE `emp_attendance_track_change` (
`user_commit` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`insert_date` datetime NOT NULL,
`action` varchar(15) COLLATE utf8_persian_ci NOT NULL,
`at_id` int(11) DEFAULT NULL,
`emp_id` int(11) NOT NULL,
`at_time` time NOT NULL,
`at_day` int(11) NOT NULL,
`at_month` int(11) NOT NULL,
`at_year` year(4) NOT NULL,
`at_singin_time` time NOT NULL,
`at_singout_time` time NOT NULL,
`at_status` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `emp_relative`
--
CREATE TABLE `emp_relative` (
`emp_rel_id` int(11) NOT NULL,
`emp_id` int(11) NOT NULL,
`rel_fname` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`rel_lname` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`rel_gender` tinyint(1) NOT NULL,
`rel_phno` char(10) COLLATE utf8_persian_ci DEFAULT NULL,
`rel_relationship` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`rel_Pvillage` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`rel_Pdistrict` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`rel_Pprovince` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`rel_Tvillage` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`rel_Tdistrict` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`rel_Tprovince` varchar(50) COLLATE utf8_persian_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Dumping data for table `emp_relative`
--
INSERT INTO `emp_relative` (`emp_rel_id`, `emp_id`, `rel_fname`, `rel_lname`, `rel_gender`, `rel_phno`, `rel_relationship`, `rel_Pvillage`, `rel_Pdistrict`, `rel_Pprovince`, `rel_Tvillage`, `rel_Tdistrict`, `rel_Tprovince`) VALUES
(1, 3, 'ahamed <br>', 'nadaf<br>', 0, '0798200300', 'uncle<br>', 'a<br>', 'b<br>', 'c<br>', 'd<br>', 'e<br>', 'f<br>'),
(2, 3, 'ahamed ', 'nadaf', 0, '0798200300', 'uncle', 'a', 'b', 'c', 'd', 'e', 'f'),
(3, 3, 'ramzan', 'sayeed', 0, '0798200300', 'uncle', 'naveli,', 'salcete', 'GOA', 'Doshi', 'tatabarak', 'Baghlan'),
(4, 9, 'anil', 'naik', 0, '0798034564', 'uncle', 'shiroda', 'ponda', 'ponda', 'ee', 'Doshi', 'ss'),
(5, 9, 'anil', 'naik', 0, '0798034564', 'uncle', 'shiroda', 'ponda', 'ponda', 'ee', 'Doshi', 'ss');
-- --------------------------------------------------------
--
-- Table structure for table `emp_reward`
--
CREATE TABLE `emp_reward` (
`emp_r_id` int(11) NOT NULL,
`emp_id` int(11) DEFAULT NULL,
`reward_letter` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `emp_warning`
--
CREATE TABLE `emp_warning` (
`emp_w_id` int(11) NOT NULL,
`emp_id` int(11) DEFAULT NULL,
`warning_letter` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `idiv_detail`
--
CREATE TABLE `idiv_detail` (
`emp_id` int(11) NOT NULL,
`ex_p` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`int_p` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`tazkera` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`12_c` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`grd_c` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`wrkp_l` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`edc_l` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`pgrd_c` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`phd_c` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`exp_c` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
`hri_l` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`hc_c` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`plc_c` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`gl_1` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`gl_l` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`contract_l` varchar(50) COLLATE utf8_persian_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Dumping data for table `idiv_detail`
--
INSERT INTO `idiv_detail` (`emp_id`, `ex_p`, `int_p`, `tazkera`, `12_c`, `grd_c`, `wrkp_l`, `edc_l`, `pgrd_c`, `phd_c`, `exp_c`, `hri_l`, `hc_c`, `plc_c`, `gl_1`, `gl_l`, `contract_l`) VALUES
(2, 'PersonalFiles/Exam Papers/ID-Card.jpg', 'PersonalFiles/Interview Papers/main-qimg-6d6a8108b', 'abcdef', 'PersonalFiles/School/main-qimg-6d6a8108bc09b0d8899', 'PersonalFiles/Post Graduate Diploma/ID-Card.jpg', 'PersonalFiles/Work Permission letters/ID-Card.jpg', 'PersonalFiles/Higher Education Confermation/ID-Car', 'PersonalFiles/Post Graduate Diploma/ID-Card.jpg', 'PersonalFiles/PHD Diploma/ID-Card.jpg', 'experiencefolder', 'PersonalFiles/Hiring Letter/ID-Card.jpg', 'PersonalFiles/Health Certificates/ID-Card.jpg', 'PersonalFiles/Police Clearanc Cetificats/ID-Card.j', 'PersonalFiles/Grauntee letteers/main-qimg-6d6a8108', 'PersonalFiles/Grauntee letteers/main-qimg-6d6a8108', 'PersonalFiles/Contract Documents/main-qimg-6d6a810'),
(3, 'PersonalFiles/Exam Papers/ID-Card.jpg', 'PersonalFiles/Interview Papers/main-qimg-6d6a8108b', 'abcdef', 'PersonalFiles/School/main-qimg-6d6a8108bc09b0d8899', 'PersonalFiles/Post Graduate Diploma/ID-Card.jpg', 'PersonalFiles/Work Permission letters/ID-Card.jpg', 'PersonalFiles/Higher Education Confermation/ID-Car', 'PersonalFiles/Post Graduate Diploma/ID-Card.jpg', 'PersonalFiles/PHD Diploma/ID-Card.jpg', 'experiencefolder', 'PersonalFiles/Hiring Letter/ID-Card.jpg', 'PersonalFiles/Health Certificates/ID-Card.jpg', 'PersonalFiles/Police Clearanc Cetificats/ID-Card.j', 'PersonalFiles/Grauntee letteers/main-qimg-6d6a8108', 'PersonalFiles/Grauntee letteers/main-qimg-6d6a8108', 'PersonalFiles/Contract Documents/main-qimg-6d6a810'),
(9, 'PersonalFiles/Exam Papers/ID-Card.jpg', 'PersonalFiles/Interview Papers/ID-Card.jpg', 'abcdef', 'PersonalFiles/School/main-qimg-6d6a8108bc09b0d8899', 'PersonalFiles/Post Graduate Diploma/ID-Card.jpg', 'PersonalFiles/Work Permission letters/ID-Card.jpg', 'PersonalFiles/Higher Education Confermation/IMG_20', 'PersonalFiles/Post Graduate Diploma/ID-Card.jpg', 'PersonalFiles/PHD Diploma/ID-Card.jpg', 'experiencefolder', 'PersonalFiles/Hiring Letter/ID-Card.jpg', 'PersonalFiles/Health Certificates/ID-Card.jpg', 'PersonalFiles/Police Clearanc Cetificats/ID-Card.j', 'PersonalFiles/Grauntee letteers/ID-Card.jpg', 'PersonalFiles/Grauntee letteers/main-qimg-6d6a8108', 'PersonalFiles/Contract Documents/ID-Card.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `leave_apply`
--
CREATE TABLE `leave_apply` (
`emp_leave_id` int(11) NOT NULL,
`emp_id` int(11) NOT NULL,
`leave_id` int(11) NOT NULL,
`apply_date` date NOT NULL,
`leave_startDate` date NOT NULL,
`leave_endDate` date NOT NULL,
`duration_incharge` int(11) NOT NULL,
`leave_reason` varchar(500) COLLATE utf8_persian_ci NOT NULL,
`leave_contact` char(10) COLLATE utf8_persian_ci NOT NULL,
`addres_in_leave` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`mgr_id` int(11) DEFAULT NULL,
`mgr_status` tinyint(1) DEFAULT NULL,
`hod_id` int(11) DEFAULT NULL,
`hod_status` tinyint(1) DEFAULT NULL,
`hrmgr_id` int(11) DEFAULT NULL,
`hrmgr_status` tinyint(1) DEFAULT NULL,
`status` tinyint(1) DEFAULT NULL,
`notify` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `leave_type`
--
CREATE TABLE `leave_type` (
`leave_type_id` int(11) NOT NULL,
`leave_name` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`leave_duration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Dumping data for table `leave_type`
--
INSERT INTO `leave_type` (`leave_type_id`, `leave_name`, `leave_duration`) VALUES
(1, 'Sick Leave', 2),
(2, 'Haij Leave', 7),
(3, 'Personal Leave', 1);
-- --------------------------------------------------------
--
-- Table structure for table `meeting`
--
CREATE TABLE `meeting` (
`meet_id` int(11) NOT NULL,
`dept_id` int(11) NOT NULL,
`meet_member1` int(11) DEFAULT NULL,
`meet_member2` int(11) DEFAULT NULL,
`meet_member3` int(11) DEFAULT NULL,
`meet_member4` int(11) DEFAULT NULL,
`meet_member5` int(11) DEFAULT NULL,
`meet_member6` int(11) DEFAULT NULL,
`meet_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `meeting_agenda`
--
CREATE TABLE `meeting_agenda` (
`meet_agenda_id` int(11) NOT NULL,
`meet_id` int(11) NOT NULL,
`meet_agenda_title` longtext COLLATE utf8_persian_ci NOT NULL,
`meet_agenda_remark` longtext COLLATE utf8_persian_ci,
`status` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `pervilidge`
--
CREATE TABLE `pervilidge` (
`pervilidge_id` int(11) NOT NULL,
`pervilidge_name` varchar(20) COLLATE utf8_persian_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Dumping data for table `pervilidge`
--
INSERT INTO `pervilidge` (`pervilidge_id`, `pervilidge_name`) VALUES
(1, 'delete'),
(2, 'update '),
(3, 'select'),
(4, 'create');
-- --------------------------------------------------------
--
-- Table structure for table `scholarship_training`
--
CREATE TABLE `scholarship_training` (
`st_id` int(11) NOT NULL,
`emp_id` int(11) NOT NULL,
`st_type` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`st_place` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`st_duration` int(11) NOT NULL,
`st_commitment_letter` varchar(50) COLLATE utf8_persian_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `usb_access`
--
CREATE TABLE `usb_access` (
`emp_id` int(11) NOT NULL,
`usb_type` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`data_type` varchar(100) COLLATE utf8_persian_ci NOT NULL,
`reason` text COLLATE utf8_persian_ci NOT NULL,
`usb_access_date` date DEFAULT NULL,
`hod_id` int(11) DEFAULT NULL,
`sysadmin_id` int(11) DEFAULT NULL,
`sysadmin_status` tinyint(1) DEFAULT NULL,
`notify` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`emp_id` int(11) NOT NULL,
`user_role_id` int(11) NOT NULL,
`user_name` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`password` varchar(50) COLLATE utf8_persian_ci NOT NULL,
`user_date` date NOT NULL,
`status` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`emp_id`, `user_role_id`, `user_name`, `password`, `user_date`, `status`) VALUES
(1, 1, 'fazluddin.fayez', '1234', '2018-09-18', 1),
(3, 3, 'abdul.raqib', '12345', '2018-10-03', 0),
(9, 3, 'farid123', '123', '2018-11-17', 1);
-- --------------------------------------------------------
--
-- Table structure for table `user_role`
--
CREATE TABLE `user_role` (
`user_role_id` int(11) NOT NULL,
`user_role` varchar(50) COLLATE utf8_persian_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Dumping data for table `user_role`
--
INSERT INTO `user_role` (`user_role_id`, `user_role`) VALUES
(1, 'admin'),
(3, 'Manager'),
(4, 'employee');
-- --------------------------------------------------------
--
-- Table structure for table `user_role_pervilidge`
--
CREATE TABLE `user_role_pervilidge` (
`user_role_id` int(11) NOT NULL,
`user_pervilidge_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
-- --------------------------------------------------------
--
-- Table structure for table `vpn_access`
--
CREATE TABLE `vpn_access` (
`emp_id` int(11) NOT NULL,
`comp_name` varchar(20) COLLATE utf8_persian_ci NOT NULL,
`comp_mac` varchar(20) COLLATE utf8_persian_ci NOT NULL,
`comp_ip` varchar(20) COLLATE utf8_persian_ci NOT NULL,
`reason` varchar(500) COLLATE utf8_persian_ci NOT NULL,
`vpn_access_date` date DEFAULT NULL,
`hod_id` int(11) DEFAULT NULL,
`hod_status` tinyint(1) DEFAULT NULL,
`sysadmin_id` int(11) DEFAULT NULL,
`sysadmin_status` tinyint(1) DEFAULT NULL,
`notify` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `branch`
--
ALTER TABLE `branch`
ADD PRIMARY KEY (`branch_id`),
ADD UNIQUE KEY `branch_name` (`branch_name`),
ADD KEY `branch_fk` (`branch_manager`);
--
-- Indexes for table `computer_change`
--
ALTER TABLE `computer_change`
ADD PRIMARY KEY (`comp_change_id`),
ADD KEY `computer_ch_fk1` (`emp_id`),
ADD KEY `computer_ch_fk2` (`mgr_id`),
ADD KEY `computer_ch_fk3` (`sysadmin`);
--
-- Indexes for table `department`
--
ALTER TABLE `department`
ADD PRIMARY KEY (`dept_id`),
ADD UNIQUE KEY `dept_name` (`dept_name`),
ADD KEY `dept_fk1` (`dept_manager`),
ADD KEY `dept_fk2` (`dept_head`);
--
-- Indexes for table `domain_user`
--
ALTER TABLE `domain_user`
ADD PRIMARY KEY (`emp_id`),
ADD UNIQUE KEY `comp_name` (`comp_name`),
ADD UNIQUE KEY `domain_user_name` (`domain_user_name`),
ADD KEY `domain_user_fk2` (`mgr_id`),
ADD KEY `domain_user_fk3` (`sysadmin_id`);
--
-- Indexes for table `employee`
--
ALTER TABLE `employee`
ADD PRIMARY KEY (`emp_id`),
ADD KEY `emp_fk1` (`emp_mgr`),
ADD KEY `emp_fk2` (`emp_dep`),
ADD KEY `emp_fk3` (`emp_branch_id`);
--
-- Indexes for table `employee_advance_salary`
--
ALTER TABLE `employee_advance_salary`
ADD PRIMARY KEY (`advan_salary_id`),
ADD KEY `em_advs_fk2` (`fmgr_id`),
ADD KEY `em_advs_fk3` (`empg1_id`),
ADD KEY `em_advs_fk4` (`empg2_id`),
ADD KEY `em_advs1_fk1` (`emp_id`);
--
-- Indexes for table `employee_attendance`
--
ALTER TABLE `employee_attendance`
ADD PRIMARY KEY (`at_id`),
ADD KEY `emp_att` (`emp_id`);
--
-- Indexes for table `employee_contract`
--
ALTER TABLE `employee_contract`
ADD PRIMARY KEY (`emp_contract_id`),
ADD KEY `emp_contract_fk` (`emp_id`);
--
-- Indexes for table `employee_overtime`
--
ALTER TABLE `employee_overtime`
ADD PRIMARY KEY (`emp_id`);
--
-- Indexes for table `employee_transfer`
--
ALTER TABLE `employee_transfer`
ADD PRIMARY KEY (`emp_transfer_id`),
ADD KEY `emp_tranfer_fk1` (`emp_id`),
ADD KEY `emp_tranfer_fk2` (`dept_id`),
ADD KEY `emp_tranfer_fk3` (`branch_id`);
--
-- Indexes for table `emp_relative`
--
ALTER TABLE `emp_relative`
ADD PRIMARY KEY (`emp_rel_id`),
ADD KEY `emp_relatv_fk` (`emp_id`);
--
-- Indexes for table `emp_reward`
--
ALTER TABLE `emp_reward`
ADD PRIMARY KEY (`emp_r_id`),
ADD KEY `emp_reward_fk` (`emp_id`);
--
-- Indexes for table `emp_warning`
--
ALTER TABLE `emp_warning`
ADD PRIMARY KEY (`emp_w_id`),
ADD KEY `emp_war_fk` (`emp_id`);
--
-- Indexes for table `idiv_detail`
--
ALTER TABLE `idiv_detail`
ADD PRIMARY KEY (`emp_id`);
--
-- Indexes for table `leave_apply`
--
ALTER TABLE `leave_apply`
ADD PRIMARY KEY (`emp_leave_id`),
ADD KEY `leave_ap_fk1` (`emp_id`),
ADD KEY `leave_ap_fk2` (`mgr_id`),
ADD KEY `leave_ap_fk3` (`hod_id`),
ADD KEY `leave_ap_fk4` (`hrmgr_id`),
ADD KEY `leave_ap_fk5` (`leave_id`);
--
-- Indexes for table `leave_type`
--
ALTER TABLE `leave_type`
ADD PRIMARY KEY (`leave_type_id`),
ADD UNIQUE KEY `leave_name` (`leave_name`);
--
-- Indexes for table `meeting`
--
ALTER TABLE `meeting`
ADD PRIMARY KEY (`meet_id`),
ADD KEY `meetint_fk1` (`dept_id`),
ADD KEY `meetint_fk2` (`meet_member1`),
ADD KEY `meetint_fk3` (`meet_member2`),
ADD KEY `meetint_fk4` (`meet_member3`),
ADD KEY `meetint_fk5` (`meet_member4`),
ADD KEY `meetint_fk6` (`meet_member5`),
ADD KEY `meetint_fk7` (`meet_member6`);
--
-- Indexes for table `meeting_agenda`
--
ALTER TABLE `meeting_agenda`
ADD PRIMARY KEY (`meet_agenda_id`),
ADD KEY `met_agenda_fk` (`meet_id`);
--
-- Indexes for table `pervilidge`
--
ALTER TABLE `pervilidge`
ADD PRIMARY KEY (`pervilidge_id`);
--
-- Indexes for table `scholarship_training`
--
ALTER TABLE `scholarship_training`
ADD PRIMARY KEY (`st_id`),
ADD KEY `sch_train_fk` (`emp_id`);
--
-- Indexes for table `usb_access`
--
ALTER TABLE `usb_access`
ADD PRIMARY KEY (`emp_id`),
ADD KEY `usb_access_fk2` (`hod_id`),
ADD KEY `usb_access_fk3` (`sysadmin_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`emp_id`),
ADD UNIQUE KEY `user_name` (`user_name`),
ADD KEY `users_fk2` (`user_role_id`);
--
-- Indexes for table `user_role`
--
ALTER TABLE `user_role`
ADD PRIMARY KEY (`user_role_id`);
--
-- Indexes for table `user_role_pervilidge`
--
ALTER TABLE `user_role_pervilidge`
ADD PRIMARY KEY (`user_pervilidge_id`,`user_role_id`),
ADD KEY `u_r_p_fk1` (`user_role_id`);
--
-- Indexes for table `vpn_access`
--
ALTER TABLE `vpn_access`
ADD PRIMARY KEY (`emp_id`),
ADD KEY `vpn_access_fk2` (`hod_id`),
ADD KEY `vpn_access_fk3` (`sysadmin_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `computer_change`
--
ALTER TABLE `computer_change`
MODIFY `comp_change_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `department`
--
ALTER TABLE `department`
MODIFY `dept_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `employee`
--
ALTER TABLE `employee`
MODIFY `emp_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `employee_advance_salary`
--
ALTER TABLE `employee_advance_salary`
MODIFY `advan_salary_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `employee_attendance`
--
ALTER TABLE `employee_attendance`
MODIFY `at_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `employee_contract`
--
ALTER TABLE `employee_contract`
MODIFY `emp_contract_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `employee_transfer`
--
ALTER TABLE `employee_transfer`
MODIFY `emp_transfer_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `emp_relative`
--
ALTER TABLE `emp_relative`
MODIFY `emp_rel_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `emp_reward`
--
ALTER TABLE `emp_reward`
MODIFY `emp_r_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `emp_warning`
--
ALTER TABLE `emp_warning`
MODIFY `emp_w_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `leave_apply`
--
ALTER TABLE `leave_apply`
MODIFY `emp_leave_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `leave_type`
--
ALTER TABLE `leave_type`
MODIFY `leave_type_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `meeting`
--
ALTER TABLE `meeting`
MODIFY `meet_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `meeting_agenda`
--
ALTER TABLE `meeting_agenda`
MODIFY `meet_agenda_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `pervilidge`
--
ALTER TABLE `pervilidge`
MODIFY `pervilidge_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `scholarship_training`
--
ALTER TABLE `scholarship_training`
MODIFY `st_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `user_role`
--
ALTER TABLE `user_role`
MODIFY `user_role_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `branch`
--
ALTER TABLE `branch`
ADD CONSTRAINT `branch_fk` FOREIGN KEY (`branch_manager`) REFERENCES `employee` (`emp_id`);
--
-- Constraints for table `department`
--
ALTER TABLE `department`
ADD CONSTRAINT `dept_fk1` FOREIGN KEY (`dept_manager`) REFERENCES `employee` (`emp_id`),
ADD CONSTRAINT `dept_fk2` FOREIGN KEY (`dept_head`) REFERENCES `employee` (`emp_id`);
--
-- Constraints for table `employee`
--
ALTER TABLE `employee`
ADD CONSTRAINT `emp_fk1` FOREIGN KEY (`emp_mgr`) REFERENCES `employee` (`emp_id`),
ADD CONSTRAINT `emp_fk2` FOREIGN KEY (`emp_dep`) REFERENCES `department` (`dept_id`),
ADD CONSTRAINT `emp_fk3` FOREIGN KEY (`emp_branch_id`) REFERENCES `branch` (`branch_id`);
--
-- Constraints for table `employee_attendance`
--
ALTER TABLE `employee_attendance`
ADD CONSTRAINT `emp_att` FOREIGN KEY (`emp_id`) REFERENCES `users` (`emp_id`);
--
-- Constraints for table `meeting`
--
ALTER TABLE `meeting`
ADD CONSTRAINT `meetint_fk1` FOREIGN KEY (`dept_id`) REFERENCES `department` (`dept_id`),
ADD CONSTRAINT `meetint_fk2` FOREIGN KEY (`meet_member1`) REFERENCES `employee` (`emp_id`),
ADD CONSTRAINT `meetint_fk3` FOREIGN KEY (`meet_member2`) REFERENCES `employee` (`emp_id`),
ADD CONSTRAINT `meetint_fk4` FOREIGN KEY (`meet_member3`) REFERENCES `employee` (`emp_id`),
ADD CONSTRAINT `meetint_fk5` FOREIGN KEY (`meet_member4`) REFERENCES `employee` (`emp_id`),
ADD CONSTRAINT `meetint_fk6` FOREIGN KEY (`meet_member5`) REFERENCES `employee` (`emp_id`),
ADD CONSTRAINT `meetint_fk7` FOREIGN KEY (`meet_member6`) REFERENCES `employee` (`emp_id`);
--
-- Constraints for table `scholarship_training`
--
ALTER TABLE `scholarship_training`
ADD CONSTRAINT `sch_train_fk` FOREIGN KEY (`emp_id`) REFERENCES `employee` (`emp_id`);
--
-- Constraints for table `usb_access`
--
ALTER TABLE `usb_access`
ADD CONSTRAINT `usb_access_fk1` FOREIGN KEY (`emp_id`) REFERENCES `users` (`emp_id`),
ADD CONSTRAINT `usb_access_fk2` FOREIGN KEY (`hod_id`) REFERENCES `users` (`emp_id`),
ADD CONSTRAINT `usb_access_fk3` FOREIGN KEY (`sysadmin_id`) REFERENCES `users` (`emp_id`);
--
-- Constraints for table `users`
--
ALTER TABLE `users`
ADD CONSTRAINT `uers_fk1` FOREIGN KEY (`emp_id`) REFERENCES `employee` (`emp_id`) ON DELETE CASCADE ON UPDATE NO ACTION,
ADD CONSTRAINT `users_fk2` FOREIGN KEY (`user_role_id`) REFERENCES `user_role` (`user_role_id`) ON UPDATE CASCADE;
--
-- Constraints for table `user_role_pervilidge`
--
ALTER TABLE `user_role_pervilidge`
ADD CONSTRAINT `u_r_p_fk1` FOREIGN KEY (`user_role_id`) REFERENCES `user_role` (`user_role_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `u_r_p_fk2` FOREIGN KEY (`user_pervilidge_id`) REFERENCES `pervilidge` (`pervilidge_id`);
--
-- Constraints for table `vpn_access`
--
ALTER TABLE `vpn_access`
ADD CONSTRAINT `vpn_access_fk1` FOREIGN KEY (`emp_id`) REFERENCES `users` (`emp_id`),
ADD CONSTRAINT `vpn_access_fk2` FOREIGN KEY (`hod_id`) REFERENCES `users` (`emp_id`),
ADD CONSTRAINT `vpn_access_fk3` FOREIGN KEY (`sysadmin_id`) REFERENCES `users` (`emp_id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
CREATE DATABASE IF NOT EXISTS `contable` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `contable`;
-- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: contable
-- ------------------------------------------------------
-- Server version 5.1.73-community
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `inflacion`
--
DROP TABLE IF EXISTS `inflacion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inflacion` (
`idinflacion` int(11) NOT NULL AUTO_INCREMENT,
`idmes` int(11) NOT NULL,
`inflamensual` decimal(5,2) NOT NULL,
`mescerrado` bit(1) NOT NULL,
PRIMARY KEY (`idinflacion`),
KEY `fk_mesinfla_idx` (`idmes`),
CONSTRAINT `fk_mesinfla` FOREIGN KEY (`idmes`) REFERENCES `mes` (`idmes`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `inflacion`
--
LOCK TABLES `inflacion` WRITE;
/*!40000 ALTER TABLE `inflacion` DISABLE KEYS */;
INSERT INTO `inflacion` VALUES (1,1,0.20,'\0'),(2,2,0.10,'\0'),(3,3,0.40,'\0'),(4,4,0.05,'\0'),(5,5,0.05,'\0'),(6,6,0.10,'\0'),(7,7,0.02,'\0'),(8,8,0.19,'\0'),(9,9,0.15,'\0'),(10,10,0.32,'\0'),(11,11,0.01,'\0'),(12,12,0.15,'\0');
/*!40000 ALTER TABLE `inflacion` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2015-02-04 13:33:04
|
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50520
Source Host : localhost:3306
Source Database : shop
Target Server Type : MYSQL
Target Server Version : 50520
File Encoding : 65001
Date: 2019-07-12 20:35:07
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `attachment`
-- ----------------------------
DROP TABLE IF EXISTS `attachment`;
CREATE TABLE `attachment` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '文件ID',
`uid` int(10) unsigned NOT NULL COMMENT 'userId',
`filename` varchar(255) NOT NULL COMMENT '文件名字',
`attachment` varchar(255) NOT NULL COMMENT '附件',
`type` tinyint(3) unsigned NOT NULL COMMENT '1为图片',
`createtime` int(10) unsigned NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of attachment
-- ----------------------------
-- ----------------------------
-- Table structure for `bonus_good`
-- ----------------------------
DROP TABLE IF EXISTS `bonus_good`;
CREATE TABLE `bonus_good` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '优惠券ID',
`bonus_type_id` mediumint(8) NOT NULL COMMENT '优惠券类型ID',
`good_id` int(10) NOT NULL COMMENT '商品ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of bonus_good
-- ----------------------------
-- ----------------------------
-- Table structure for `bonus_type`
-- ----------------------------
DROP TABLE IF EXISTS `bonus_type`;
CREATE TABLE `bonus_type` (
`type_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '优惠券类型',
`type_name` varchar(60) NOT NULL DEFAULT '' COMMENT '类型名称',
`type_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '优惠券金额',
`send_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '发放类型',
`deleted` int(1) NOT NULL DEFAULT '0',
`min_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最小数量',
`max_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最大数量',
`send_start_date` int(11) NOT NULL DEFAULT '0' COMMENT '发放开始时间',
`send_end_date` int(11) NOT NULL DEFAULT '0' COMMENT '发放结束时间',
`use_start_date` int(11) NOT NULL DEFAULT '0' COMMENT '可以用券的开始日期',
`use_end_date` int(11) NOT NULL DEFAULT '0' COMMENT '可以用券的结束日期',
`min_goods_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最小商品数量',
PRIMARY KEY (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of bonus_type
-- ----------------------------
-- ----------------------------
-- Table structure for `bonus_user`
-- ----------------------------
DROP TABLE IF EXISTS `bonus_user`;
CREATE TABLE `bonus_user` (
`bonus_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '优惠券ID',
`bonus_type_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券类型ID',
`bonus_sn` varchar(20) NOT NULL DEFAULT '' COMMENT '订单号',
`openid` varchar(50) NOT NULL DEFAULT '' COMMENT '验证ID',
`deleted` int(1) NOT NULL DEFAULT '0' COMMENT '是否移除',
`isuse` int(1) NOT NULL DEFAULT '0' COMMENT '是否可用',
`used_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用时间',
`order_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '订单号',
`collect_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '得到优惠券的时间',
`createtime` int(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`bonus_id`),
KEY `openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of bonus_user
-- ----------------------------
-- ----------------------------
-- Table structure for `config`
-- ----------------------------
DROP TABLE IF EXISTS `config`;
CREATE TABLE `config` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '配置ID',
`title` varchar(50) NOT NULL COMMENT '商城名称',
`address` varchar(100) NOT NULL COMMENT '商城公司地址',
`webtitle` varchar(50) NOT NULL COMMENT '浏览器标题',
`email` varchar(50) NOT NULL COMMENT '商城邮箱',
`keyword` varchar(100) NOT NULL COMMENT '商城关键字',
`description` varchar(200) NOT NULL COMMENT '商城描述',
`phone` varchar(50) NOT NULL COMMENT '商城电话',
`icp` varchar(50) NOT NULL COMMENT '备案号',
`logo` varchar(200) DEFAULT NULL COMMENT '商城logo图',
`tongjicode` longtext COMMENT '商城第三方统计js代码',
`kfcode` longtext COMMENT '商城第三方客服代码',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of config
-- ----------------------------
INSERT INTO `config` VALUES ('21', '惠特集商城', '重庆市渝中区两路口', '惠特集', '999888@qq.com', '网上购物,网上商城,家电,手机,电脑,服装,居家,母婴,美妆,个护,食品,生鲜,京东', '重庆本地快速配送的优质商城', '400-777-888', '渝B2-20110050-2', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0oSDSANnOPAAADGh7PIv4829.png', ' <script>\nvar _hmt = _hmt || [];\n(function() {\n var hm = document.createElement(\"script\");\n hm.src = \"https://hm.baidu.com/hm.js?5d97579683fd910de47a9477b8ea2ab3\";\n var s = document.getElementsByTagName(\"script\")[0]; \n s.parentNode.insertBefore(hm, s);\n})();\n</script>\n', '<script type=\"text/javascript\" src=\"http://webchat.7moor.com/javascripts/7moorInit.js?accessId=5d8477d0-79a7-11e5-a21d-a319553981f9&autoShow=true\" async=\"async\"></script>\n \n <button onclick=\"qimoChatClick()\">在线咨询</button>\n');
-- ----------------------------
-- Table structure for `delivery_mode`
-- ----------------------------
DROP TABLE IF EXISTS `delivery_mode`;
CREATE TABLE `delivery_mode` (
`id` int(5) NOT NULL AUTO_INCREMENT COMMENT '编号',
`deliveryexplain` varchar(20) NOT NULL COMMENT '配送说明',
`deliveryfee` double(5,2) NOT NULL COMMENT '配送小费',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of delivery_mode
-- ----------------------------
INSERT INTO `delivery_mode` VALUES ('3', '顺丰快递', '15.00');
INSERT INTO `delivery_mode` VALUES ('4', '天天快递', '12.00');
INSERT INTO `delivery_mode` VALUES ('6', '京东快递', '15.00');
INSERT INTO `delivery_mode` VALUES ('7', '自提', '0.00');
-- ----------------------------
-- Table structure for `dispatch`
-- ----------------------------
DROP TABLE IF EXISTS `dispatch`;
CREATE TABLE `dispatch` (
`id` int(7) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(20) NOT NULL DEFAULT '',
`name` varchar(120) NOT NULL DEFAULT '',
`sendtype` int(5) NOT NULL DEFAULT '1' COMMENT '0为快递,1为自提',
`desc` text NOT NULL,
`configs` text NOT NULL,
`enabled` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of dispatch
-- ----------------------------
-- ----------------------------
-- Table structure for `gold_order`
-- ----------------------------
DROP TABLE IF EXISTS `gold_order`;
CREATE TABLE `gold_order` (
`createtime` int(10) NOT NULL,
`status` int(1) NOT NULL DEFAULT '0',
`paytime` int(10) DEFAULT '0' COMMENT '支付时间',
`price` decimal(10,2) NOT NULL,
`openid` varchar(40) NOT NULL,
`ordersn` varchar(20) NOT NULL,
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of gold_order
-- ----------------------------
-- ----------------------------
-- Table structure for `gold_teller`
-- ----------------------------
DROP TABLE IF EXISTS `gold_teller`;
CREATE TABLE `gold_teller` (
`createtime` int(10) NOT NULL,
`status` int(2) NOT NULL DEFAULT '0' COMMENT '0未审核-1拒绝1审核功成',
`fee` decimal(10,2) NOT NULL,
`openid` varchar(40) NOT NULL,
`ordersn` varchar(20) DEFAULT NULL,
`id` int(10) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of gold_teller
-- ----------------------------
-- ----------------------------
-- Table structure for `member`
-- ----------------------------
DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
`email` varchar(20) NOT NULL,
`credit` int(11) NOT NULL DEFAULT '0' COMMENT '积分',
`gold` double NOT NULL DEFAULT '0' COMMENT '余额',
`openid` varchar(50) NOT NULL,
`realname` varchar(20) NOT NULL,
`mobile` varchar(11) NOT NULL,
`pwd` varchar(50) NOT NULL,
`salt` varchar(20) DEFAULT NULL COMMENT 'MD5盐',
`createtime` int(10) NOT NULL,
`istemplate` int(1) DEFAULT '0' COMMENT '是否为临时账户 1是,0为否',
`status` int(1) DEFAULT '1' COMMENT '0为禁用,1为可用',
`experience` int(11) DEFAULT '0' COMMENT '账户经验值',
`avatar` varchar(200) DEFAULT '' COMMENT '用户头像',
`outgold` double NOT NULL DEFAULT '0' COMMENT '已提取余额',
`outgoldinfo` varchar(1000) DEFAULT '0' COMMENT '提款信息 序列化',
`weixin_openid` varchar(100) DEFAULT '' COMMENT '微信openid',
`alipay_openid` varchar(50) DEFAULT '' COMMENT '阿里openid',
PRIMARY KEY (`openid`),
KEY `idx_member_from_user` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of member
-- ----------------------------
INSERT INTO `member` VALUES ('1212@qq.com', '11', '120', '12', '李家旺', '121212', 'lijiawang', null, '20190701', '0', '0', '111', '李家旺', '12', '12', null, null);
INSERT INTO `member` VALUES ('16547313@qq.com', '0', '0', '13', '445', '55', '66', null, '20190707', '1', '0', '0', '', '0', '0', null, null);
INSERT INTO `member` VALUES ('422470668@qq.com', '99', '100', '8b14450f-c834-41ce-9a7d-09b43704ead8', '刘奕', '18723010804', 'liuyi', null, '20190702', '1', '1', '100', '刘奕', '10', '10', null, null);
-- ----------------------------
-- Table structure for `member_paylog`
-- ----------------------------
DROP TABLE IF EXISTS `member_paylog`;
CREATE TABLE `member_paylog` (
`createtime` int(10) NOT NULL,
`remark` varchar(100) NOT NULL,
`fee` decimal(10,2) NOT NULL,
`openid` varchar(40) NOT NULL,
`type` varchar(30) NOT NULL COMMENT 'usegold使用金额 addgold充值金额 usecredit使用积分 addcredit充值积分',
`pid` bigint(20) NOT NULL AUTO_INCREMENT,
`account_fee` decimal(10,2) NOT NULL COMMENT '账户剩余积分或余额',
PRIMARY KEY (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of member_paylog
-- ----------------------------
-- ----------------------------
-- Table structure for `modules`
-- ----------------------------
DROP TABLE IF EXISTS `modules`;
CREATE TABLE `modules` (
`displayorder` int(11) NOT NULL DEFAULT '0',
`icon` varchar(30) NOT NULL,
`group` varchar(30) NOT NULL,
`title` varchar(30) NOT NULL,
`version` decimal(5,2) NOT NULL,
`name` varchar(30) NOT NULL,
`isdisable` int(1) DEFAULT '0' COMMENT '模块是否禁用',
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of modules
-- ----------------------------
-- ----------------------------
-- Table structure for `modules_menu`
-- ----------------------------
DROP TABLE IF EXISTS `modules_menu`;
CREATE TABLE `modules_menu` (
`href` varchar(200) NOT NULL,
`title` varchar(50) NOT NULL,
`module` varchar(30) NOT NULL,
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of modules_menu
-- ----------------------------
-- ----------------------------
-- Table structure for `paylog`
-- ----------------------------
DROP TABLE IF EXISTS `paylog`;
CREATE TABLE `paylog` (
`paytype` varchar(30) NOT NULL COMMENT '支付方式',
`paymaney` varchar(10) NOT NULL COMMENT '支付金额',
`ptype` varchar(10) NOT NULL COMMENT '支付类型',
`typename` varchar(30) NOT NULL COMMENT '支付方式',
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`pId` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of paylog
-- ----------------------------
INSERT INTO `paylog` VALUES ('微信支付', '10', '网银', '中国银行', '1', '0');
INSERT INTO `paylog` VALUES ('微信支付', '20', '网银', '余额支付', '2', '0');
INSERT INTO `paylog` VALUES ('微信支付', '30', '网银', '工商银行', '3', '0');
INSERT INTO `paylog` VALUES ('银联', '0', '网银', '邮储银行', '4', '1');
INSERT INTO `paylog` VALUES ('银联', '100', '网银', '建设银行', '5', '2');
INSERT INTO `paylog` VALUES ('银联', '50', '网银', '农业银行', '6', '3');
INSERT INTO `paylog` VALUES ('货到付款', '1000', '现金', '现金', '7', '4');
-- ----------------------------
-- Table structure for `paylog_alipay`
-- ----------------------------
DROP TABLE IF EXISTS `paylog_alipay`;
CREATE TABLE `paylog_alipay` (
`createtime` int(10) NOT NULL COMMENT '创建时间',
`alipay_safepid` varchar(50) DEFAULT NULL,
`buyer_email` varchar(50) DEFAULT NULL COMMENT '买家邮箱',
`buyer_id` varchar(50) DEFAULT NULL COMMENT '买家ID',
`out_trade_no` varchar(50) DEFAULT NULL,
`seller_email` varchar(50) DEFAULT NULL COMMENT '卖家邮箱',
`seller_id` varchar(50) DEFAULT NULL COMMENT '卖家id',
`total_fee` decimal(10,2) DEFAULT NULL COMMENT '交易金额',
`trade_no` varchar(50) DEFAULT NULL COMMENT '交易编号',
`body` varchar(200) DEFAULT NULL,
`orderid` int(10) DEFAULT NULL COMMENT '订单id',
`ordersn` varchar(50) DEFAULT NULL,
`reason` varchar(100) DEFAULT NULL,
`presult` varchar(50) DEFAULT NULL COMMENT 'success 或error',
`order_table` varchar(50) DEFAULT NULL COMMENT '订单类型 shop_order gold_order',
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of paylog_alipay
-- ----------------------------
-- ----------------------------
-- Table structure for `paylog_unionpay`
-- ----------------------------
DROP TABLE IF EXISTS `paylog_unionpay`;
CREATE TABLE `paylog_unionpay` (
`createtime` int(10) NOT NULL COMMENT '创建时间',
`txnTime` int(10) DEFAULT NULL COMMENT '交易时间',
`txnAmt` decimal(10,2) DEFAULT NULL COMMENT '交易金额',
`queryid` varchar(50) DEFAULT NULL COMMENT '交易查询流水号',
`currencyCode` varchar(10) DEFAULT NULL COMMENT '交易币种',
`reqReserved` varchar(100) DEFAULT NULL COMMENT '请求保留域',
`settleAmt` decimal(10,2) DEFAULT NULL COMMENT '清算金额',
`settleCurrencyCode` varchar(10) DEFAULT NULL COMMENT '清算币种',
`traceTime` int(10) DEFAULT NULL COMMENT '交易传输时间',
`traceNo` varchar(50) DEFAULT NULL COMMENT '系统跟踪号',
`merId` varchar(50) DEFAULT NULL COMMENT '商户代码',
`orderid` int(10) DEFAULT NULL COMMENT '订单id',
`ordersn` varchar(50) DEFAULT NULL,
`reason` varchar(100) DEFAULT NULL,
`presult` varchar(50) DEFAULT NULL COMMENT 'success 或error',
`order_table` varchar(50) DEFAULT NULL COMMENT '订单类型 shop_order gold_order',
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of paylog_unionpay
-- ----------------------------
-- ----------------------------
-- Table structure for `paylog_weixin`
-- ----------------------------
DROP TABLE IF EXISTS `paylog_weixin`;
CREATE TABLE `paylog_weixin` (
`createtime` int(10) NOT NULL,
`timeend` int(10) DEFAULT NULL,
`total_fee` decimal(10,2) DEFAULT NULL COMMENT '交易金额',
`mchId` varchar(50) DEFAULT NULL COMMENT '商户id',
`openid` varchar(50) DEFAULT NULL COMMENT '验证id',
`transaction_id` varchar(50) DEFAULT NULL COMMENT '交易id',
`out_trade_no` varchar(50) DEFAULT NULL COMMENT '贸易id',
`orderid` int(10) DEFAULT NULL COMMENT '订单id',
`ordersn` varchar(50) DEFAULT NULL COMMENT '订单号',
`reason` varchar(100) DEFAULT NULL,
`presult` varchar(50) DEFAULT NULL COMMENT 'success 或error',
`order_table` varchar(50) DEFAULT NULL COMMENT '订单类型 shop_order gold_order',
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of paylog_weixin
-- ----------------------------
-- ----------------------------
-- Table structure for `payment`
-- ----------------------------
DROP TABLE IF EXISTS `payment`;
CREATE TABLE `payment` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(20) NOT NULL DEFAULT '' COMMENT '商品编码',
`name` varchar(120) NOT NULL DEFAULT '',
`desc` text NOT NULL,
`order` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '订单',
`configs` text NOT NULL,
`enabled` tinyint(1) unsigned NOT NULL DEFAULT '0',
`iscod` tinyint(1) unsigned NOT NULL DEFAULT '0',
`online` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `pay_code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of payment
-- ----------------------------
-- ----------------------------
-- Table structure for `rank_model`
-- ----------------------------
DROP TABLE IF EXISTS `rank_model`;
CREATE TABLE `rank_model` (
`rank_level` int(3) NOT NULL DEFAULT '0' COMMENT '等级',
`rank_name` varchar(50) DEFAULT NULL COMMENT '等级名称',
`experience` int(11) DEFAULT '0',
PRIMARY KEY (`rank_level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of rank_model
-- ----------------------------
INSERT INTO `rank_model` VALUES ('1', '普通会员', '10000');
INSERT INTO `rank_model` VALUES ('2', '白银会员', '50000');
INSERT INTO `rank_model` VALUES ('3', '黄金会员', '100000');
-- ----------------------------
-- Table structure for `shop_address`
-- ----------------------------
DROP TABLE IF EXISTS `shop_address`;
CREATE TABLE `shop_address` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '地址id',
`openid` varchar(50) NOT NULL COMMENT '信息',
`realname` varchar(20) NOT NULL COMMENT '真实名字',
`mobile` varchar(11) NOT NULL COMMENT '手机号码',
`province` varchar(30) DEFAULT NULL COMMENT '省份',
`city` varchar(30) NOT NULL COMMENT '城市',
`area` varchar(30) NOT NULL COMMENT '区',
`address` varchar(300) NOT NULL COMMENT '地址',
`isdefault` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0为否,1是',
`deleted` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_address
-- ----------------------------
INSERT INTO `shop_address` VALUES ('1', '8b14450f-c834-41ce-9a7d-09b43704ead8', '刘奕', '18723010804', '', '重庆', '南坪', '万达广场', '1', '0');
INSERT INTO `shop_address` VALUES ('2', '8b14450f-c834-41ce-9a7d-09b43704ead8', '刘奕', '18723010804', null, '重庆', '渝中', '文化宫', '0', '0');
-- ----------------------------
-- Table structure for `shop_adv`
-- ----------------------------
DROP TABLE IF EXISTS `shop_adv`;
CREATE TABLE `shop_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '图片id',
`link` varchar(255) NOT NULL DEFAULT '' COMMENT '链接',
`thumb` varchar(255) DEFAULT '' COMMENT '图片内容',
`displayorder` int(11) DEFAULT '0' COMMENT '显示顺序',
`enabled` int(11) DEFAULT '0' COMMENT '启用',
PRIMARY KEY (`id`),
KEY `indx_enabled` (`enabled`),
KEY `indx_displayorder` (`displayorder`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_adv
-- ----------------------------
INSERT INTO `shop_adv` VALUES ('24', '/admin/manage/user', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0oSr6ATJbsAADkbiG5Imw885.jpg', '1', '1');
INSERT INTO `shop_adv` VALUES ('25', '/admin/manage/role', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0oSxmAZJcvAADQXfYZd90316.jpg', '1', '1');
INSERT INTO `shop_adv` VALUES ('26', '/admin/manage/roleUser', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0oSySAUMn6AADPlkPYMfQ36.jpeg', '1', '1');
INSERT INTO `shop_adv` VALUES ('27', '/admin/manage/menu', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0oSz6AIYgsAAD5crmjXs4676.jpg', '1', '1');
INSERT INTO `shop_adv` VALUES ('28', '/admin/manage/member', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0oS1KAAZZLAAEalogPkek616.jpg', '1', '1');
-- ----------------------------
-- Table structure for `shop_cart`
-- ----------------------------
DROP TABLE IF EXISTS `shop_cart`;
CREATE TABLE `shop_cart` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
`goodsid` int(11) NOT NULL COMMENT '商品编号',
`goodstype` tinyint(1) NOT NULL DEFAULT '1' COMMENT '商品类别',
`session_id` varchar(50) NOT NULL,
`total` int(10) unsigned NOT NULL COMMENT '总计',
`optionid` int(10) DEFAULT '0' COMMENT '分类信息自动编号',
`marketprice` decimal(10,2) DEFAULT '0.00' COMMENT '市场价格',
PRIMARY KEY (`id`),
KEY `idx_openid` (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_cart
-- ----------------------------
-- ----------------------------
-- Table structure for `shop_category`
-- ----------------------------
DROP TABLE IF EXISTS `shop_category`;
CREATE TABLE `shop_category` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '分类',
`commission` int(10) unsigned DEFAULT '0' COMMENT '推荐该类商品所能获得的佣金',
`name` varchar(50) NOT NULL COMMENT '分类名称',
`thumb` varchar(255) DEFAULT NULL COMMENT '分类图片',
`thumbadv` varchar(255) DEFAULT NULL COMMENT '分类广告图片',
`thumbadvurl` varchar(255) DEFAULT NULL COMMENT '分类广告url',
`parentid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上级分类ID,0为第一级',
`isrecommand` int(10) DEFAULT '0' COMMENT '推荐',
`description` varchar(500) DEFAULT NULL COMMENT '分类介绍',
`displayorder` tinyint(3) unsigned DEFAULT '0' COMMENT '排序',
`deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
`enabled` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否开启',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_category
-- ----------------------------
INSERT INTO `shop_category` VALUES ('1', '10', '生鲜水果', null, null, '', '0', '1', '分类介绍', '1', '0', '1');
INSERT INTO `shop_category` VALUES ('2', '10', '海鲜水产', null, null, '', '1', '1', '海鲜水产', '1', '0', '1');
INSERT INTO `shop_category` VALUES ('11', '1', '三文鱼', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lnW-AKrERAAFlfQLrta0208.jpg', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lnP-ASQIcAAAtjL_7TH0018.jpg', '', '2', '1', '三文鱼', '0', '1', '1');
INSERT INTO `shop_category` VALUES ('14', '10', '粮油副食', null, null, '', '0', '1', '粮油副食', '0', '1', '1');
INSERT INTO `shop_category` VALUES ('16', '10', '菌菇干货', null, null, '', '14', '1', '菌菇干货', '0', '1', '1');
INSERT INTO `shop_category` VALUES ('17', '1', '木耳', 'http://huiteji.oss-cn-hangzhou.aliyuncs.com/Storage/Plat/ImageAd/201712151156550109500.jpg', null, '', '16', '1', '好吃的木耳', '0', '1', '1');
INSERT INTO `shop_category` VALUES ('18', '10', '居家日用', null, null, '', '0', '1', '居家日用', '0', '1', '1');
INSERT INTO `shop_category` VALUES ('19', '10', '厨具', null, null, '', '18', '1', '家用厨具', '0', '1', '1');
INSERT INTO `shop_category` VALUES ('20', '1', '锅具', 'http://huiteji.oss-cn-hangzhou.aliyuncs.com/Storage/Plat/ImageAd/201801041615108392170.jpg', null, '', '19', '1', '家用锅具', '0', '1', '1');
INSERT INTO `shop_category` VALUES ('21', '10', '食品酒水', '', '', '', '0', '1', '食品酒水', '0', '1', '1');
INSERT INTO `shop_category` VALUES ('22', '10', '高端白酒', null, null, '', '21', '1', '高端白酒', '0', '1', '1');
INSERT INTO `shop_category` VALUES ('23', '1', '贵州茅台', 'http://huiteji.oss-cn-hangzhou.aliyuncs.com/Storage/Plat/ImageAd/201801111632012385520.jpg\" width=\"50\" height=\"50\"', null, '', '22', '1', '贵州茅台', '0', '1', '1');
INSERT INTO `shop_category` VALUES ('26', '0', '鱼类', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lno-Abd05AABHlLoCk-k833.jpg', '', '', '2', '1', '鱼类', '0', '1', '1');
INSERT INTO `shop_category` VALUES ('27', '0', '贝类', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lnq-AIvHSAAEZISndrMY977.jpg', '', '', '2', '1', '贝类', null, '1', '1');
INSERT INTO `shop_category` VALUES ('28', '0', '蟹类', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lsFaANv22AAEGCiALugI794.jpg', '', '', '2', '1', '蟹类', null, '1', '1');
INSERT INTO `shop_category` VALUES ('29', '0', '虾类', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lsIWAfCetAAEb_s5yHic965.jpg', '', '', '2', '1', '虾类', null, '1', '1');
INSERT INTO `shop_category` VALUES ('30', '0', '大闸蟹', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lsKyAC-MVAAGitrf0lT4418.jpg', '', '', '2', '1', '大闸蟹', null, '1', '1');
INSERT INTO `shop_category` VALUES ('31', '0', '鸡枞油', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lsQ2AX7ECAAHee2XXTlo647.jpg', '', '', '16', '1', '鸡枞油', null, '1', '1');
INSERT INTO `shop_category` VALUES ('32', '0', '野生松茸干', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lsTyAOgRwAAMTy_m7J3Q921.jpg', '', '', '16', '1', '野生松茸干', null, '1', '1');
INSERT INTO `shop_category` VALUES ('33', '0', '宽叶海带', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lsVyAD0jIAAAkYNKnbq0010.jpg', '', '', '16', '1', '宽叶海带', null, '1', '1');
INSERT INTO `shop_category` VALUES ('34', '0', '香菇', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lsXqAacRxAAKFpYIh3xE060.jpg', '', '', '16', '1', '香菇', null, '1', '1');
INSERT INTO `shop_category` VALUES ('35', '0', '水具酒具', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lsdqAJBBIAAAIIDQsnOI583.jpg', '', '', '19', '1', '水具酒具', null, '1', '1');
INSERT INTO `shop_category` VALUES ('36', '0', '餐具', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lsf6AbC4AAAAis2PdN9s874.jpg', '', '', '19', '1', '餐具', null, '1', '1');
INSERT INTO `shop_category` VALUES ('37', '0', '功能厨具', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lsiGAPMbDAAAMLZ4pt_4960.jpg', '', '', '19', '1', '功能厨具', null, '1', '1');
INSERT INTO `shop_category` VALUES ('38', '0', '咖啡具', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0lsjqAcQvlAAA0Jxuf8iM246.png', '', '', '19', '1', '咖啡具', null, '1', '1');
INSERT INTO `shop_category` VALUES ('39', '0', '新鲜水果', '', '', '', '1', '1', '新鲜水果', null, '1', '1');
INSERT INTO `shop_category` VALUES ('40', '0', '巫山脆李', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0ltZWAQKEiAACOInTVBy0789.jpg', '', '', '39', '1', '巫山脆李', null, '1', '1');
INSERT INTO `shop_category` VALUES ('41', '0', '苹果', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0ltcGAcaTzAAA5nOKaCJA902.jpg', '', '', '39', '1', '苹果', null, '1', '1');
INSERT INTO `shop_category` VALUES ('42', '0', '五粮液', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0oTQWAZH8hAAA1l9UQjoo001.jpg', '', '', '22', '1', '五粮液', null, '1', '1');
INSERT INTO `shop_category` VALUES ('43', '0', '精品白酒', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0oTS-AfFGOAAAtgy7gNp0625.jpg', '', '', '22', '1', '精品白酒', null, '1', '1');
INSERT INTO `shop_category` VALUES ('44', '7', '啤酒', '', '', '', '21', '1', '啤酒', null, '1', '1');
INSERT INTO `shop_category` VALUES ('45', '0', '国产啤酒', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0oTZ2AHZeQAABLDUG-V1g533.jpg', '', '', '44', '1', '', null, '1', '1');
INSERT INTO `shop_category` VALUES ('46', '0', '黑啤', 'http://192.168.13.180/group1/M00/00/00/wKgNtF0oTcOABJCRAACpoSX5k8g373.jpg', '', '', '44', '1', '黑啤', null, '1', '1');
-- ----------------------------
-- Table structure for `shop_dispatch`
-- ----------------------------
DROP TABLE IF EXISTS `shop_dispatch`;
CREATE TABLE `shop_dispatch` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '分类',
`dispatchname` varchar(50) NOT NULL COMMENT '派件名字',
`sendtype` int(5) NOT NULL DEFAULT '1' COMMENT '0为快递,1为自提',
`firstprice` decimal(10,2) NOT NULL COMMENT '首重价格',
`secondprice` decimal(10,2) NOT NULL COMMENT '续重价格',
`provance` varchar(30) DEFAULT '',
`city` varchar(30) DEFAULT '' COMMENT '城市',
`area` varchar(30) DEFAULT '' COMMENT '区',
`firstweight` int(10) NOT NULL COMMENT '首重',
`secondweight` int(10) NOT NULL COMMENT '续重',
`express` varchar(50) NOT NULL COMMENT '快递',
`deleted` int(10) NOT NULL DEFAULT '0' COMMENT '是否删除',
`displayorder` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
PRIMARY KEY (`id`),
KEY `indx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_dispatch
-- ----------------------------
-- ----------------------------
-- Table structure for `shop_diymenu`
-- ----------------------------
DROP TABLE IF EXISTS `shop_diymenu`;
CREATE TABLE `shop_diymenu` (
`menu_type` varchar(10) NOT NULL COMMENT '选择类型',
`torder` int(2) NOT NULL COMMENT '订单主表',
`icon` varchar(30) NOT NULL COMMENT '图标',
`url` varchar(350) NOT NULL COMMENT '链接',
`tname` varchar(100) NOT NULL COMMENT '姓名',
`id序号` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id序号`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_diymenu
-- ----------------------------
-- ----------------------------
-- Table structure for `shop_goods`
-- ----------------------------
DROP TABLE IF EXISTS `shop_goods`;
CREATE TABLE `shop_goods` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`pcate` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '一级分类',
`ccate` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '请选择二级分类',
`type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '0为实体,1为虚拟',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否上架销售 1上架 2下架',
`displayorder` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '显示上架顺序',
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '标题',
`thumb` varchar(255) DEFAULT '' COMMENT '移除图片',
`description` varchar(1000) NOT NULL DEFAULT '' COMMENT '商品简单描述',
`content` text NOT NULL COMMENT '商品详细描述',
`goodssn` varchar(50) NOT NULL DEFAULT '' COMMENT '端口货号',
`weight` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '重量',
`productsn` varchar(50) NOT NULL DEFAULT '' COMMENT '商品条码',
`marketprice` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '本店售价',
`productprice` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '市场售价',
`total` int(10) NOT NULL DEFAULT '0' COMMENT '库存',
`totalcnf` int(11) DEFAULT '0' COMMENT '0 拍下减库存 1 付款减库存 2 永久不减',
`sales` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '销售额',
`createtime` int(10) unsigned NOT NULL COMMENT '创建时间',
`credit` int(11) DEFAULT '0' COMMENT '信用积分',
`hasoption` int(11) DEFAULT '0' COMMENT '选择',
`isnew` int(11) DEFAULT '0' COMMENT '新品',
`issendfree` int(11) DEFAULT NULL COMMENT '免运费商品,打勾表示此商品不会产生运费花销,否则按照正常运费计算。',
`ishot` int(11) DEFAULT '0' COMMENT '热卖',
`isdiscount` int(11) DEFAULT '0' COMMENT '打折',
`isrecommand` int(11) DEFAULT '0' COMMENT '首页推荐',
`istime` int(11) DEFAULT '0' COMMENT '限时促销,1开启限时促销',
`timestart` int(11) DEFAULT '0' COMMENT '开启限时促销',
`timeend` int(11) DEFAULT '0' COMMENT '关闭限时促销',
`viewcount` int(11) DEFAULT '0' COMMENT '浏览次数',
`remark` text COMMENT '奖励积分,会员购买商品赠送的积分, 如果不填写,则默认为不奖励积分',
`deleted` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '已删除',
`isfirst` int(1) DEFAULT '0' COMMENT '首发',
`isjingping` int(1) DEFAULT '0' COMMENT '精品',
`isverify` int(1) DEFAULT '0' COMMENT '是否是核销产品0否1是',
PRIMARY KEY (`id`,`goodssn`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_goods
-- ----------------------------
INSERT INTO `shop_goods` VALUES ('1', '1', '1', '0', '1', '1', '绿鲜知 圣女果 小番茄 樱桃番茄约500g 新鲜蔬菜', 'https://m.360buyimg.com/mobilecms/s750x750_jfs/t18214/360/2386198411/293049/11e5e4b1/5af25da3N8e3ececc.jpg', '此商品将于2019-07-13,00点结束闪购特卖,京觅生鲜专场', '牛肉制造啊', '1', '12.00', '12', '20.00', '24.00', '12', '1', '1', '20190702', '10', '1', '1', '0', '1', '0', '0', '0', '20180701', '20190731', '10', '10', '2', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('2', '1', '2', '1', '2', '0', '猪肉', 'https://m.360buyimg.com/mobilecms/s750x750_jfs/t18214/360/2386198411/293049/11e5e4b1/5af25da3N8e3ececc.jpg', '脆', '猪肉制造', '2', '13.00', '11', '12.00', '25.00', '13', '2', '1', '20190703', '11', '1', '0', '1', '0', '1', '1', '1', '20180702', '20190731', '11', '11', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('3', '1', '1', '1', '2', '1', '香蕉22222', 'https://m.360buyimg.com/mobilecms/s750x750_jfs/t18214/360/2386198411/293049/11e5e4b1/5af25da3N8e3ececc.jpg', '好吃', '助消化', '33879', '4.50', '963852', '3.00', '4.00', '5', '2', '5555', '1562642282', '123', '1', '1', '1', '1', '1', '1', '0', '123456', '123456789', '555', '没得', '2', '0', '2', '0');
INSERT INTO `shop_goods` VALUES ('9', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562919677', '0', '0', '1', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('10', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562919701', '0', '0', '1', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('11', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562919820', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('12', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920462', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('13', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920467', '0', '0', '0', null, '1', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('14', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920612', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('15', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920621', '0', '0', '0', null, '1', '1', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('16', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920817', '0', '0', '0', null, '1', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('17', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920826', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('18', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920843', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('19', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920851', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('20', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920852', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('21', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920852', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('22', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920979', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('23', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562920984', '0', '0', '0', null, '1', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('24', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562922203', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('25', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562922226', '0', '0', '0', null, '1', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('26', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562922720', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('27', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562922723', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('28', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562922735', '0', '0', '0', null, '1', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('29', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562922743', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('30', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562922752', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('31', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562923197', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('32', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562923580', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('33', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562923853', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('34', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562923880', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('35', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562923921', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
INSERT INTO `shop_goods` VALUES ('36', '0', '0', '1', '1', '0', '', '', '', '', '', '0.00', '', '0.00', '0.00', '0', '0', '0', '1562923971', '0', '0', '0', null, '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0');
-- ----------------------------
-- Table structure for `shop_goods_comment`
-- ----------------------------
DROP TABLE IF EXISTS `shop_goods_comment`;
CREATE TABLE `shop_goods_comment` (
`createtime` int(10) NOT NULL COMMENT '创建时间',
`optionname` varchar(100) DEFAULT NULL COMMENT '选项名称',
`orderid` int(10) DEFAULT NULL COMMENT '订单id',
`ordersn` varchar(20) DEFAULT NULL COMMENT '订单编号',
`openid` varchar(50) DEFAULT NULL COMMENT '查看id',
`comment` text COMMENT '评价',
`rate` int(1) DEFAULT '0' COMMENT '0差评 1中评 2好评',
`goodsid` int(10) DEFAULT NULL COMMENT '商品编号',
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品评价id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_goods_comment
-- ----------------------------
-- ----------------------------
-- Table structure for `shop_goods_option`
-- ----------------------------
DROP TABLE IF EXISTS `shop_goods_option`;
CREATE TABLE `shop_goods_option` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '商品选项id',
`goodsid` int(10) DEFAULT '0' COMMENT '商品编号',
`title` varchar(50) DEFAULT '' COMMENT '添加规格',
`thumb` varchar(60) DEFAULT '' COMMENT '移除',
`productprice` decimal(10,2) DEFAULT '0.00' COMMENT '市场售价',
`marketprice` decimal(10,2) DEFAULT '0.00' COMMENT '本店售价',
`costprice` decimal(10,2) DEFAULT '0.00' COMMENT '成本价格',
`stock` int(11) DEFAULT '0' COMMENT '库存',
`weight` decimal(10,2) DEFAULT '0.00' COMMENT '重量',
`displayorder` int(11) DEFAULT '0' COMMENT '显示上架顺序',
`specs` text COMMENT '规格',
PRIMARY KEY (`id`),
KEY `indx_goodsid` (`goodsid`),
KEY `indx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_goods_option
-- ----------------------------
-- ----------------------------
-- Table structure for `shop_goods_piclist`
-- ----------------------------
DROP TABLE IF EXISTS `shop_goods_piclist`;
CREATE TABLE `shop_goods_piclist` (
`picurl` varchar(255) NOT NULL COMMENT '图片地址',
`goodid` int(11) NOT NULL COMMENT '商品编号',
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_goods_piclist
-- ----------------------------
-- ----------------------------
-- Table structure for `shop_goods_spec`
-- ----------------------------
DROP TABLE IF EXISTS `shop_goods_spec`;
CREATE TABLE `shop_goods_spec` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品规格id',
`title` varchar(50) NOT NULL COMMENT '规格名',
`description` varchar(1000) NOT NULL COMMENT '详情描述',
`displaytype` tinyint(3) unsigned NOT NULL COMMENT '显示上架种类',
`content` text NOT NULL COMMENT '目录',
`goodsid` int(11) DEFAULT '0' COMMENT '商品编号',
`displayorder` int(11) DEFAULT '0' COMMENT '显示上架顺序',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_goods_spec
-- ----------------------------
-- ----------------------------
-- Table structure for `shop_goods_spec_item`
-- ----------------------------
DROP TABLE IF EXISTS `shop_goods_spec_item`;
CREATE TABLE `shop_goods_spec_item` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '商品规格项目id',
`specid` int(11) DEFAULT '0' COMMENT '规格id',
`title` varchar(255) DEFAULT '' COMMENT '商品规格项目标题',
`thumb` varchar(255) DEFAULT '' COMMENT '移除图片',
`show` int(11) DEFAULT '0' COMMENT '上架',
`displayorder` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `indx_specid` (`specid`),
KEY `indx_show` (`show`),
KEY `indx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_goods_spec_item
-- ----------------------------
-- ----------------------------
-- Table structure for `shop_order`
-- ----------------------------
DROP TABLE IF EXISTS `shop_order`;
CREATE TABLE `shop_order` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`openid` varchar(50) NOT NULL,
`ordersn` varchar(20) NOT NULL,
`credit` int(10) NOT NULL DEFAULT '0',
`price` decimal(10,2) NOT NULL DEFAULT '0.00',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '-6已退款 -5已退货 -4退货中, -3换货中, -2退款中,-1取消状态,0普通状态,1为已付款,2为已发货,3为成功',
`sendtype` tinyint(1) unsigned NOT NULL COMMENT '0为快递,1为自提',
`paytype` tinyint(1) NOT NULL COMMENT '1为余额,2为在线,3为到付',
`paytypecode` varchar(30) NOT NULL COMMENT '0货到付款,1微支付,2支付宝付款,3余额支付,4积分支付',
`paytypename` varchar(50) NOT NULL,
`transid` varchar(50) NOT NULL DEFAULT '0' COMMENT '外部单号(微支付单号等)',
`remark` varchar(1000) NOT NULL DEFAULT '',
`expresscom` varchar(30) NOT NULL,
`expresssn` varchar(50) NOT NULL,
`express` varchar(30) NOT NULL,
`addressid` int(10) unsigned NOT NULL,
`goodsprice` decimal(10,2) DEFAULT '0.00',
`dispatchprice` decimal(10,2) DEFAULT '0.00',
`dispatchexpress` varchar(50) DEFAULT '',
`dispatch` int(10) DEFAULT '0',
`createtime` int(10) unsigned NOT NULL,
`address_address` varchar(100) NOT NULL,
`address_area` varchar(10) NOT NULL,
`address_city` varchar(10) NOT NULL,
`address_province` varchar(10) NOT NULL,
`address_realname` varchar(10) NOT NULL,
`address_mobile` varchar(20) NOT NULL,
`rsreson` varchar(500) DEFAULT '' COMMENT '退货款退原因',
`isrest` int(1) NOT NULL DEFAULT '0',
`paytime` int(10) DEFAULT '0' COMMENT '订单支付时间',
`updatetime` int(10) DEFAULT '0' COMMENT '订单更新时间',
`hasbonus` int(1) DEFAULT '0' COMMENT '是否使用优惠券',
`bonusprice` decimal(10,2) DEFAULT '0.00' COMMENT '优惠券抵消金额',
`isverify` int(1) DEFAULT '0' COMMENT '是否是核销订单0否1是',
`verify_shopvname` varchar(50) DEFAULT '' COMMENT '核销门店名称',
`verify_shopvid` int(10) DEFAULT '0' COMMENT '核销门店id',
`verify_openid` varchar(50) DEFAULT '' COMMENT '核销员openid',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_order
-- ----------------------------
-- ----------------------------
-- Table structure for `shop_order_goods`
-- ----------------------------
DROP TABLE IF EXISTS `shop_order_goods`;
CREATE TABLE `shop_order_goods` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`orderid` int(10) unsigned NOT NULL,
`goodsid` int(10) unsigned NOT NULL,
`status` tinyint(3) DEFAULT '0' COMMENT '申请状态,-2为标志删除,-1为审核无效,0为未申请,1为正在申请,2为审核通过',
`content` text,
`price` decimal(10,2) DEFAULT '0.00',
`total` int(10) unsigned NOT NULL DEFAULT '1',
`optionid` int(10) DEFAULT '0',
`createtime` int(10) unsigned NOT NULL,
`optionname` text,
`iscomment` int(1) DEFAULT '0' COMMENT '是否已评论0否1是',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_order_goods
-- ----------------------------
-- ----------------------------
-- Table structure for `shop_order_paylog`
-- ----------------------------
DROP TABLE IF EXISTS `shop_order_paylog`;
CREATE TABLE `shop_order_paylog` (
`createtime` int(10) NOT NULL COMMENT '订单创建时间',
`orderid` int(10) NOT NULL COMMENT '订单编号',
`fee` decimal(10,2) NOT NULL COMMENT '费用',
`openid` varchar(40) NOT NULL COMMENT '身份授权',
`pid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '支付方式id',
PRIMARY KEY (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_order_paylog
-- ----------------------------
-- ----------------------------
-- Table structure for `shop_pormotions`
-- ----------------------------
DROP TABLE IF EXISTS `shop_pormotions`;
CREATE TABLE `shop_pormotions` (
`description` varchar(200) DEFAULT NULL COMMENT '描述(预留)',
`endtime` int(10) NOT NULL COMMENT '结束时间',
`starttime` int(10) NOT NULL COMMENT '开始时间',
`condition` decimal(10,2) NOT NULL COMMENT '条件',
`promoteType` int(11) NOT NULL COMMENT '0 按订单数包邮 1满额包邮',
`pname` varchar(100) NOT NULL COMMENT '名称',
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '促销编号',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of shop_pormotions
-- ----------------------------
-- ----------------------------
-- Table structure for `sys_menu`
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`menuName` varchar(50) NOT NULL COMMENT '菜单名称',
`menuLevel` int(11) NOT NULL COMMENT '1目录,2代表菜单,3代表按钮',
`actionName` varchar(200) DEFAULT NULL COMMENT '后台url地址',
`authority` varchar(50) DEFAULT NULL COMMENT '唯一权限标识',
`sort` int(11) NOT NULL DEFAULT '0',
`display` int(11) NOT NULL DEFAULT '1' COMMENT '1可见,0不可见',
`parentId` int(11) NOT NULL DEFAULT '0',
`parentLevel` varchar(50) NOT NULL COMMENT '记录上一级的等级,多个以 0|1|',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES ('1', '系统管理', '1', null, null, '0', '1', '0', '0');
INSERT INTO `sys_menu` VALUES ('2', '数据库字典', '2', '/admin/manage/database/shop', 'admin:manage:database:shop', '0', '1', '1', '0|1');
INSERT INTO `sys_menu` VALUES ('5', '订单管理', '1', null, null, '0', '1', '0', '0');
INSERT INTO `sys_menu` VALUES ('6', '新增订单', '2', null, null, '0', '1', '5', '0|5');
INSERT INTO `sys_menu` VALUES ('7', '订单查询', '2', '/admin/manage/order', 'admin:manage:order', '0', '1', '5', '0|5');
INSERT INTO `sys_menu` VALUES ('12', '修改', '3', null, 'order:edit', '0', '0', '7', '0|7|12');
INSERT INTO `sys_menu` VALUES ('14', '会员管理', '1', null, null, '0', '1', '0', '0');
INSERT INTO `sys_menu` VALUES ('15', '会员列表', '2', '/admin/manage/member', 'admin:manage:member', '0', '1', '14', '0|14');
INSERT INTO `sys_menu` VALUES ('16', '新增', '3', null, 'member:add', '0', '0', '15', '0|14|15');
INSERT INTO `sys_menu` VALUES ('17', '修改', '3', null, 'member:edit', '0', '0', '15', '0|14|15');
INSERT INTO `sys_menu` VALUES ('18', '会员等级', '2', '/admin/mamage/rank', 'admin:mamage:rank', '0', '1', '14', '0|14');
INSERT INTO `sys_menu` VALUES ('19', '新增', '3', null, 'rank:add', '0', '0', '18', '0|14|18');
INSERT INTO `sys_menu` VALUES ('20', '修改', '3', null, 'rank:edit', '0', '0', '18', '0|14|18');
INSERT INTO `sys_menu` VALUES ('21', '商品管理', '1', null, null, '0', '1', '0', '0');
INSERT INTO `sys_menu` VALUES ('22', '商品列表', '2', '/admin/manage/shopgoods', 'admin:mamage:shopgoods', '0', '1', '21', '0|21');
INSERT INTO `sys_menu` VALUES ('23', '新增', '3', null, 'shopgoods:add', '0', '0', '22', '0|21|22');
INSERT INTO `sys_menu` VALUES ('24', '修改', '3', null, 'shopgoods:edit', '0', '0', '22', '0|21|22');
INSERT INTO `sys_menu` VALUES ('25', '商品分类', '2', '/admin/manage/category', 'admin:manage:category', '0', '1', '21', '0|21');
INSERT INTO `sys_menu` VALUES ('26', '新增', '3', null, 'category:add', '0', '0', '25', '0|21|25');
INSERT INTO `sys_menu` VALUES ('27', '修改', '3', null, 'category:edit', '0', '0', '25', '0|21|25');
INSERT INTO `sys_menu` VALUES ('28', '添加新商品', '2', '/admin/manage/goods/add', 'admin:goods:add', '0', '1', '21', '0|21');
INSERT INTO `sys_menu` VALUES ('29', '权限管理', '1', null, null, '0', '1', '0', '0');
INSERT INTO `sys_menu` VALUES ('30', '后台管理员', '2', '/admin/manage/user', 'admin:mamage:user', '0', '1', '29', '0|29');
INSERT INTO `sys_menu` VALUES ('31', '新增', '3', null, 'user:add', '0', '0', '30', '0|29|30');
INSERT INTO `sys_menu` VALUES ('32', '修改', '3', null, 'user:edit', '0', '0', '30', '0|29|30');
INSERT INTO `sys_menu` VALUES ('33', '角色列表', '2', '/admin/manage/sysRole', 'admin:mamage:role', '0', '1', '29', '0|29');
INSERT INTO `sys_menu` VALUES ('34', '新增', '3', null, 'role:add', '0', '0', '33', '0|29|33');
INSERT INTO `sys_menu` VALUES ('35', '修改', '3', null, 'role:edit', '0', '0', '33', '0|29|33');
INSERT INTO `sys_menu` VALUES ('36', '菜单列表', '2', '/admin/manage/menu', 'admin:manage:menu', '0', '1', '29', '0|29');
INSERT INTO `sys_menu` VALUES ('37', '新增', '3', null, 'menu:add', '0', '0', '36', '0|29|36');
INSERT INTO `sys_menu` VALUES ('38', '修改', '3', null, 'menu.edit', '0', '0', '36', '0|29|36');
INSERT INTO `sys_menu` VALUES ('39', '分配用户', '3', null, 'role:user', '0', '1', '33', '0|29|33');
INSERT INTO `sys_menu` VALUES ('40', '分配权限', '3', null, 'role:menu', '0', '1', '33', '0|29|33');
INSERT INTO `sys_menu` VALUES ('41', '商城配置', '2', '/admin/manage/config', 'admin:manage:config', '0', '1', '1', '0|1');
INSERT INTO `sys_menu` VALUES ('42', '商城配送方式', '2', '/admin/manage/delivery', 'admin:manage:delivery', '0', '1', '1', '0|1');
INSERT INTO `sys_menu` VALUES ('43', '修改', '3', null, 'delivery:edit', '0', '1', '42', '0|1|42');
INSERT INTO `sys_menu` VALUES ('44', '新增', '3', null, 'delivery:add', '0', '1', '42', '0|1|42');
INSERT INTO `sys_menu` VALUES ('45', '删除', '3', null, 'delivery:del', '0', '1', '42', '0|1|42');
-- ----------------------------
-- Table structure for `sys_role`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`rolename` varchar(20) NOT NULL COMMENT '角色名称',
`authority` varchar(50) DEFAULT NULL COMMENT '唯一权限标识',
`state` int(11) NOT NULL DEFAULT '1' COMMENT '1启用,0禁用',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES ('1', '管理员11111', 'adminstrator11111', '1');
INSERT INTO `sys_role` VALUES ('2', '财务经理', 'FinanceManager', '1');
INSERT INTO `sys_role` VALUES ('3', '人事经理', 'HRManager', '1');
INSERT INTO `sys_role` VALUES ('4', '工程部经理', 'bbb', '1');
INSERT INTO `sys_role` VALUES ('9', '工程部经理111111', 'yhihmhoi44', '0');
-- ----------------------------
-- Table structure for `sys_role_menu`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`roleId` int(11) NOT NULL COMMENT '角色编号',
`menuId` int(11) NOT NULL COMMENT '菜单编号',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=128 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
INSERT INTO `sys_role_menu` VALUES ('2', '2', '2');
INSERT INTO `sys_role_menu` VALUES ('93', '1', '1');
INSERT INTO `sys_role_menu` VALUES ('94', '1', '2');
INSERT INTO `sys_role_menu` VALUES ('95', '1', '41');
INSERT INTO `sys_role_menu` VALUES ('96', '1', '5');
INSERT INTO `sys_role_menu` VALUES ('97', '1', '6');
INSERT INTO `sys_role_menu` VALUES ('98', '1', '7');
INSERT INTO `sys_role_menu` VALUES ('99', '1', '12');
INSERT INTO `sys_role_menu` VALUES ('100', '1', '14');
INSERT INTO `sys_role_menu` VALUES ('101', '1', '15');
INSERT INTO `sys_role_menu` VALUES ('102', '1', '16');
INSERT INTO `sys_role_menu` VALUES ('103', '1', '17');
INSERT INTO `sys_role_menu` VALUES ('104', '1', '18');
INSERT INTO `sys_role_menu` VALUES ('105', '1', '19');
INSERT INTO `sys_role_menu` VALUES ('106', '1', '20');
INSERT INTO `sys_role_menu` VALUES ('107', '1', '21');
INSERT INTO `sys_role_menu` VALUES ('108', '1', '22');
INSERT INTO `sys_role_menu` VALUES ('109', '1', '23');
INSERT INTO `sys_role_menu` VALUES ('110', '1', '24');
INSERT INTO `sys_role_menu` VALUES ('111', '1', '25');
INSERT INTO `sys_role_menu` VALUES ('112', '1', '26');
INSERT INTO `sys_role_menu` VALUES ('113', '1', '27');
INSERT INTO `sys_role_menu` VALUES ('114', '1', '28');
INSERT INTO `sys_role_menu` VALUES ('115', '1', '29');
INSERT INTO `sys_role_menu` VALUES ('116', '1', '30');
INSERT INTO `sys_role_menu` VALUES ('117', '1', '31');
INSERT INTO `sys_role_menu` VALUES ('118', '1', '32');
INSERT INTO `sys_role_menu` VALUES ('119', '1', '33');
INSERT INTO `sys_role_menu` VALUES ('120', '1', '34');
INSERT INTO `sys_role_menu` VALUES ('121', '1', '35');
INSERT INTO `sys_role_menu` VALUES ('122', '1', '39');
INSERT INTO `sys_role_menu` VALUES ('123', '1', '40');
INSERT INTO `sys_role_menu` VALUES ('124', '1', '36');
INSERT INTO `sys_role_menu` VALUES ('125', '1', '37');
INSERT INTO `sys_role_menu` VALUES ('126', '1', '38');
INSERT INTO `sys_role_menu` VALUES ('127', '1', '42');
-- ----------------------------
-- Table structure for `sys_role_user`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_user`;
CREATE TABLE `sys_role_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL COMMENT '用户编号',
`roleId` int(11) NOT NULL COMMENT '角色编号',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_role_user
-- ----------------------------
INSERT INTO `sys_role_user` VALUES ('3', '2', '2');
INSERT INTO `sys_role_user` VALUES ('4', '1', '1');
INSERT INTO `sys_role_user` VALUES ('5', '2', '1');
-- ----------------------------
-- Table structure for `thirdlogin`
-- ----------------------------
DROP TABLE IF EXISTS `thirdlogin`;
CREATE TABLE `thirdlogin` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT COMMENT '第三方登录编号',
`code` varchar(20) NOT NULL DEFAULT '' COMMENT '第三方授权临时票据',
`name` varchar(120) NOT NULL DEFAULT '' COMMENT '第三方快捷登录名',
`desc` text NOT NULL COMMENT '第三方浏览器访问快捷登录名',
`configs` text NOT NULL COMMENT '配置信息',
`enabled` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0.未激活 1已激活',
PRIMARY KEY (`id`),
UNIQUE KEY `pay_code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of thirdlogin
-- ----------------------------
-- ----------------------------
-- Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`salt` varchar(5) NOT NULL COMMENT 'MD5盐',
`createtime` int(10) NOT NULL COMMENT '创建时间',
`password` varchar(50) NOT NULL COMMENT '密码',
`username` varchar(50) NOT NULL COMMENT '用户名',
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('XW996', '1561520761', '641499d19b373450d99f5a97b18ca605', 'boos', '1');
INSERT INTO `user` VALUES ('lAC4T', '1561520789', 'd390380106e2b73d601ad9da3ed7361f', 'admin', '2');
INSERT INTO `user` VALUES ('e6yb@', '1562045369', '80292f27356b1d3cba6ce256f802b0db', 'maoqi', '3');
INSERT INTO `user` VALUES ('6opph', '1562064320', '10b08b20ec2b54568152e0e660b6ac61', 'test1', '4');
INSERT INTO `user` VALUES ('8=Ors', '1562116408', 'd95548d94c7a0a5824ea8affbada6128', 'maoqi1', '5');
INSERT INTO `user` VALUES ('jK43z', '1562552474', 'abcf4b508c7199f3717c08c0122e3e04', 'test001', '6');
INSERT INTO `user` VALUES ('nG4Kv', '1562552692', '1baea61a30711d4945419d9794b299fe', 'tt11', '7');
-- ----------------------------
-- Table structure for `weixin_rule`
-- ----------------------------
DROP TABLE IF EXISTS `weixin_rule`;
CREATE TABLE `weixin_rule` (
`url` varchar(500) NOT NULL COMMENT '链接地址',
`thumb` varchar(60) NOT NULL COMMENT '图文',
`keywords` varchar(50) NOT NULL COMMENT '关键字',
`title` varchar(50) NOT NULL COMMENT '标题',
`description` varchar(255) DEFAULT NULL COMMENT '描述',
`ruletype` int(11) NOT NULL COMMENT '1文本回复 2图文回复',
`addonsrule` int(1) NOT NULL DEFAULT '0' COMMENT '0常规,1模块规则',
`addonsModule` varchar(50) DEFAULT '' COMMENT '所属模块',
`content` text COMMENT '内容',
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of weixin_rule
-- ----------------------------
-- ----------------------------
-- Table structure for `weixin_wxfans`
-- ----------------------------
DROP TABLE IF EXISTS `weixin_wxfans`;
CREATE TABLE `weixin_wxfans` (
`createtime` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
`openid` varchar(50) DEFAULT NULL COMMENT '身份认证',
`weixin_openid` varchar(100) NOT NULL COMMENT '微信身份授权认证',
`follow` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否订阅',
`nickname` varchar(100) NOT NULL DEFAULT '' COMMENT '昵称',
`avatar` varchar(200) NOT NULL DEFAULT '' COMMENT '头像',
`gender` tinyint(1) NOT NULL DEFAULT '0' COMMENT '性别(0:保密 1:男 2:女)',
`longitude` decimal(10,2) DEFAULT '0.00' COMMENT '地理位置经度',
`latitude` decimal(10,2) DEFAULT '0.00' COMMENT '地理位置纬度',
`precision` decimal(10,2) DEFAULT '0.00' COMMENT '地理位置精度',
PRIMARY KEY (`weixin_openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of weixin_wxfans
-- ----------------------------
|
/*
Navicat MySQL Data Transfer
Source Server : rm-uf6vl7168doce1268do.mysql.rds.aliyuncs.com
Source Server Version : 50718
Source Host : rm-uf6vl7168doce1268do.mysql.rds.aliyuncs.com:3306
Source Database : nterp
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2018-09-21 21:47:21
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for login
-- ----------------------------
DROP TABLE IF EXISTS `login`;
CREATE TABLE `login` (
`loginaccount` varchar(30) NOT NULL,
`loginpasswd` varchar(255) DEFAULT NULL,
`login_uuid` varchar(125) DEFAULT NULL,
PRIMARY KEY (`loginaccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of login
-- ----------------------------
INSERT INTO `login` VALUES ('admin', 'WVdSdGFXND0=', '111');
INSERT INTO `login` VALUES ('guest', 'WjNWbGMzUT0=', null);
INSERT INTO `login` VALUES ('test', 'ZEdWemRBPT0=', null);
|
/* Formatted on 5/16/2017 8:32:27 PM (QP5 v5.114.809.3010)
Consolidated all separate queries to make a single one. Removed any group by queries ( sum, count etc.).
All groupings will be taken care of at the reporting level.
*/
SELECT TARIFF_INFO_USED_SERVICE_PKEY,
(SELECT DES
FROM MPUSNTAB
WHERE SNCODE = UDR.TARIFF_INFO_SNCODE)
USAGE_SUB_CATEGORY,
CASE
WHEN NVL (ROUNDED_VOLUME, 0) = 0 THEN FREE_ROUNDED_VOLUME_VOLUME
WHEN NVL (FREE_ROUNDED_VOLUME_VOLUME, 0) = 0 THEN ROUNDED_VOLUME
END
DURATION,
(SELECT DES
FROM MPSUMTAB
WHERE UMCODE = UDR.ROUNDED_VOLUME_UMCODE)
UOM,
S_P_NUMBER_ADDRESS MSISDN,
RATED_FLAT_AMOUNT_DISC_AMOUNT AMOUNT,
CASE
WHEN CALL_TYPE = 1
THEN
CONCAT (CONCAT (UDR.TMO_USAGE_TYPE, '-'), 'OUTGOING')
WHEN CALL_TYPE = 2
THEN
CONCAT (CONCAT (UDR.TMO_USAGE_TYPE, '-'), 'INCOMING')
WHEN TARIFF_INFO_USED_SERVICE_PKEY = 'DATA'
THEN
'0'
END
AS DIRECTION,
NVL (CALL_CHANNEL_TYPE, '-'),
UDR.TMO_USAGE_TYPE,
UDR.TMO_USAGE_SUBTYPE_2,
TMO_RATING_TYPE,
TMO_USAGE_SUBTYPE_1, -- CALL TYPE
CASE
WHEN RATED_FLAT_AMOUNT_DISC_AMOUNT < '0.00' THEN 'C- CREDIT'
WHEN RATED_FLAT_AMOUNT_DISC_AMOUNT > '0.00' THEN 'D- DEBIT'
WHEN RATED_FLAT_AMOUNT_DISC_AMOUNT = '0.00' THEN 'O- OTHER'
END
AS CHARGE_TYPE,
START_TIME_TIMESTAMP + START_TIME_OFFSET / (60 * 60) / 24 EVENT_TIME,
RATE_PLAN.EPC_PROD_OFFER,
PRODUCT_OFFERING_NAME,
RATE_PLAN_DATA_IND,
TEST_INDICATOR,
O_P_NUMBER_ADDRESS CALLED_NUMBER,
S_P_NUMBER_US_CITY FROM_CITY,
S_P_NUMBER_US_STATE FROM_STATE, -- Available only when the call origin is domestic
O_P_NUMBER_US_CITY TO_CITY,
O_P_NUMBER_US_STATE TO_STATE, -- Available when call is "domestic to domestic" or "roaming call to domestic"
S_P_NUMBER_COUNTRY_CODE FROM_COUNTRY_CODE,
(SELECT NAME
FROM COUNTRY
WHERE S_P_NUMBER_COUNTRY_CODE = ISO)
FROM_COUNTRY_NAME, -- Available when 'roaming call to domestic' or 'roaming call to international'
O_P_NUMBER_COUNTRY_CODE TO_COUNTRY_CODE,
(SELECT NAME
FROM COUNTRY
WHERE O_P_NUMBER_COUNTRY_CODE = ISO)
TO_COUNTRY_NAME, --Available when 'domestic to international' or 'roaming call to international'
(SELECT PLMNNAME
FROM MPDPLTAB
WHERE PLCODE = NET_ELEMENT_NETWORK_CODE)
OPERATOR_NAME
FROM (SELECT DISTINCT
TM.EPC_PROD_OFFER,
PO.PRODUCT_OFFERING_NAME,
RPO.RATE_PLAN_CLASSIFICATION,
TM.TMCODE,
TM.SPCODE,
TM.SNCODE,
CASE
WHEN RPO.RATE_PLAN_CLASSIFICATION LIKE '%MBB%'
THEN
'YES'
ELSE
'NO'
END
AS RATE_PLAN_DATA_IND
FROM MPULKTMB TM,
EPCCSOM.PRODUCT_OFFERING PO,
EPCCSOM.RATE_PLAN_OFFERING RPO
WHERE TM.EPC_PROD_OFFER = PO.PRODUCT_OFFERING_ID(+)
AND PO.PRODUCT_OFFERING_ID = RPO.PRODUCT_OFFERING_ID)
RATE_PLAN,
(SELECT BAA.CONTRACT_ID,
BAA.BILLING_ACCOUNT_ID BAN,
CASE
WHEN UPPER(BAC.STRING23) = 'YES' THEN 'TEST ACCOUNT'
ELSE 'NO'
END
AS TEST_INDICATOR
FROM BILLING_ACCOUNT_ASSIGNMENT BAA,
BILLACC_CHARACTERISTICS BAC,
CHARACTERISTICS_DEF CD
WHERE BAA.BILLING_ACCOUNT_ID = BAC.BILLING_ACCOUNT_ID(+)
AND BAC.CHAR_ID = CD.CHAR_ID
AND CD.CHAR_SHDES = 'BAEXT') TEST_IND,
(SELECT * FROM SYSADM_RX.UDR_PRE_NONZERO
UNION ALL
SELECT * FROM SYSADM_RX.UDR_PRE_ZERO) UDR,
CONTRACT_ALL CA
WHERE UDR.CUST_INFO_CONTRACT_ID = CA.CO_ID
AND UDR.CUST_INFO_CONTRACT_ID = TEST_IND.CONTRACT_ID
AND UDR.TARIFF_INFO_TMCODE = RATE_PLAN.TMCODE
AND UDR.TARIFF_INFO_SPCODE = RATE_PLAN.SPCODE
AND UDR.TARIFF_INFO_SNCODE = RATE_PLAN.SNCODE
AND TARIFF_INFO_USED_SERVICE_PKEY IN ('VOICE', 'TEXT', 'DATA')
|
-- migrate:up
CREATE INDEX operations_id_timestamp_idx ON operations(wallet_id, timestamp);
CREATE INDEX wallets_user_id_idx ON wallets(user_id);
-- migrate:down
DROP INDEX wallets_user_id_idx;
DROP INDEX operations_id_timestamp_idx;
|
2018-10-17 14:00:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.490ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.260ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
545.390ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.860ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.690ms
2018-10-17 14:01:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.270ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.980ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
773.890ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
5.300ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.430ms
2018-10-17 14:02:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.270ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.790ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
505.000ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.410ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.540ms
2018-10-17 14:03:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
9.090ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.290ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
494.510ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
5.810ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
3.200ms
2018-10-17 14:04:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.280ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.740ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
459.000ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.430ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.450ms
2018-10-17 14:05:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.190ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
4.190ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
543.460ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.930ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
3.210ms
2018-10-17 14:06:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.920ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.710ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
445.820ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.940ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.850ms
2018-10-17 14:07:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
5.400ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
7.170ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
437.870ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.600ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.760ms
2018-10-17 14:08:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
14.060ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
4.460ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
500.250ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.000ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.390ms
2018-10-17 14:09:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
12.290ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.370ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
376.450ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.550ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.470ms
2018-10-17 14:10:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.350ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
4.160ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
349.510ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.080ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
4.350ms
2018-10-17 14:11:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
4.800ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.130ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
595.300ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.730ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
3.250ms
2018-10-17 14:12:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.120ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.640ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
737.070ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.250ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.590ms
2018-10-17 14:13:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.570ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.100ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
628.120ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
8.330ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.160ms
2018-10-17 14:14:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
8.570ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
5.230ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
643.370ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.670ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.510ms
2018-10-17 14:15:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.170ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.840ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
662.990ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.400ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.720ms
2018-10-17 14:16:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
10.460ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.650ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
676.630ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
11.330ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
10.860ms
2018-10-17 14:17:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
7.390ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.010ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
561.760ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
7.470ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.570ms
2018-10-17 14:18:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.990ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.040ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
397.400ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.130ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.640ms
2018-10-17 14:19:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.980ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
5.430ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
354.690ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
14.820ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.540ms
2018-10-17 14:20:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.360ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.220ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
527.590ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.230ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.670ms
2018-10-17 14:21:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.340ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.490ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
688.290ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.110ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.580ms
2018-10-17 14:22:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
4.220ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
5.220ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
480.140ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.310ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.680ms
2018-10-17 14:23:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.470ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.720ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
581.330ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.300ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.750ms
2018-10-17 14:24:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.180ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.540ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
609.290ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.620ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.600ms
2018-10-17 14:25:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.530ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.730ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
707.930ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.130ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
5.530ms
2018-10-17 14:26:18
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
5.320ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
6.610ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
273.480ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
8.040ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
6.590ms
2018-10-17 14:27:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.710ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
4.240ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
556.170ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
5.590ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.590ms
2018-10-17 14:28:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
6.930ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.830ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
709.250ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.450ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.500ms
2018-10-17 14:29:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
6.670ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.100ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
464.620ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.620ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.670ms
2018-10-17 14:30:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.290ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.700ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
491.600ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
17.330ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.620ms
2018-10-17 14:31:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.390ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
1.990ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
667.980ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.670ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
3.390ms
2018-10-17 14:32:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.950ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.670ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
555.960ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.850ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.690ms
2018-10-17 14:33:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.970ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.930ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
721.240ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
11.030ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.610ms
2018-10-17 14:34:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
11.120ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.500ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
593.330ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.180ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.330ms
2018-10-17 14:35:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.260ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.540ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
182.560ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.440ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.710ms
2018-10-17 14:36:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.920ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.400ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
179.120ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.580ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.410ms
2018-10-17 14:37:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.090ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.630ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
178.130ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.740ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.820ms
2018-10-17 14:38:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.000ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.650ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
180.910ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.430ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.840ms
2018-10-17 14:39:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.350ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
12.370ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
178.180ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.890ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.560ms
2018-10-17 14:40:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.450ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.900ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
187.060ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.060ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.740ms
2018-10-17 14:41:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.910ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.580ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
181.010ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.740ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.660ms
2018-10-17 14:42:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.170ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.480ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
181.470ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
4.340ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.520ms
2018-10-17 14:43:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.300ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.450ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
263.250ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.670ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
3.800ms
2018-10-17 14:44:19
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.810ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.540ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
247.870ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.670ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.570ms
2018-10-17 14:45:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.260ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.010ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
257.830ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
2.990ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.350ms
2018-10-17 14:46:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.270ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.870ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
264.690ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.630ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.340ms
2018-10-17 14:47:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.570ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.840ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
248.530ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
5.880ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.430ms
2018-10-17 14:48:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.150ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.600ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
193.770ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.360ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
4.900ms
2018-10-17 14:49:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
5.790ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
4.200ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
247.580ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
9.990ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.300ms
2018-10-17 14:50:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.630ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
3.140ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
188.400ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.020ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.410ms
2018-10-17 14:51:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.150ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.690ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
200.940ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.910ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.200ms
2018-10-17 14:52:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
4.900ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.470ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
209.560ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.210ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.310ms
2018-10-17 14:53:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.160ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.590ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
184.460ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
2.990ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.410ms
2018-10-17 14:54:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.980ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.400ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
179.910ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.330ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.530ms
2018-10-17 14:55:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.820ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.870ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
195.910ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.260ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.430ms
2018-10-17 14:56:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.760ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.320ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
180.300ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.090ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.380ms
2018-10-17 14:57:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.950ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.980ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
182.190ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.240ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.210ms
2018-10-17 14:58:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.090ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.400ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
179.010ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
3.580ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.540ms
2018-10-17 14:59:20
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
2.770ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.140ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and `begin_time` > 1540310400 group by `lottery_id`
192.490ms
select `id`, `name` from `lotteries` where (`status` = 3) order by `id` asc
2.920ms
select * from `admin_users` where `admin_users`.`id` = 6 limit 1
2.430ms
|
ALTER TABLE Slots DROP FOREIGN KEY `Slots_ibfk_3`;
ALTER TABLE Slots DROP FOREIGN KEY `Slots_ibfk_2`;
ALTER TABLE Slots DROP FOREIGN KEY `Slots_ibfk_1`;
ALTER TABLE Slots DROP PRIMARY KEY;
ALTER TABLE Slots ADD PRIMARY KEY (timeId, roomId);
ALTER TABLE Slots ADD CONSTRAINT
FOREIGN KEY (sessionId) REFERENCES Sessions (id) ON DELETE CASCADE;
ALTER TABLE Slots ADD CONSTRAINT
FOREIGN KEY (timeId) REFERENCES Times (id);
ALTER TABLE Slots ADD CONSTRAINT
FOREIGN KEY (roomId) REFERENCES Rooms (id); |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 10-Maio-2020 às 22:42
-- Versão do servidor: 10.4.11-MariaDB
-- versão do PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Banco de dados: `lixo`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `evento`
--
CREATE TABLE `evento` (
`id_evento` int(11) NOT NULL,
`data` date NOT NULL DEFAULT current_timestamp(),
`hora` time NOT NULL DEFAULT current_timestamp(),
`id_lixeira` int(11) NOT NULL,
`descricao` varchar(45) NOT NULL,
`id_usuario` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `evento`
--
INSERT INTO `evento` (`id_evento`, `data`, `hora`, `id_lixeira`, `descricao`, `id_usuario`) VALUES
(1, '2020-04-26', '17:12:12', 12345, 'Jogaram cocô na lixeira de metal', 123),
(3, '2020-04-28', '19:26:10', 12345, 'Cachorro morto no lixo', 123),
(4, '2020-05-10', '16:35:45', 121212, 'Esvaziou lixeira', 123);
-- --------------------------------------------------------
--
-- Estrutura da tabela `funcionario`
--
CREATE TABLE `funcionario` (
`id_funcionario` int(11) NOT NULL,
`nome` varchar(45) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `funcionario`
--
INSERT INTO `funcionario` (`id_funcionario`, `nome`) VALUES
(111, 'Leo Milk'),
(123, 'Victor Korsh');
-- --------------------------------------------------------
--
-- Estrutura da tabela `historico_lixeira_sensor_capacidade`
--
CREATE TABLE `historico_lixeira_sensor_capacidade` (
`id_historico_capacidade` int(11) NOT NULL,
`id_lixeira` int(11) NOT NULL,
`capacidade` float NOT NULL COMMENT '0 (vazia) até 1 (cheia)',
`data` date NOT NULL DEFAULT current_timestamp(),
`hora` time NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `historico_lixeira_sensor_capacidade`
--
INSERT INTO `historico_lixeira_sensor_capacidade` (`id_historico_capacidade`, `id_lixeira`, `capacidade`, `data`, `hora`) VALUES
(1, 12345, 0.8, '2020-04-26', '18:30:35'),
(3, 12345, 0.5, '2020-04-28', '20:24:00'),
(4, 121212, 0, '2020-05-10', '16:34:06');
-- --------------------------------------------------------
--
-- Estrutura da tabela `historico_lixeira_sensor_tampa`
--
CREATE TABLE `historico_lixeira_sensor_tampa` (
`id_historico_tampa` int(11) NOT NULL,
`id_lixeira` int(11) NOT NULL,
`valor` tinyint(1) NOT NULL,
`data` date NOT NULL DEFAULT current_timestamp(),
`hora` time NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `historico_lixeira_sensor_tampa`
--
INSERT INTO `historico_lixeira_sensor_tampa` (`id_historico_tampa`, `id_lixeira`, `valor`, `data`, `hora`) VALUES
(1, 12345, 1, '2020-04-26', '17:14:05'),
(3, 12345, 1, '2020-04-28', '21:20:17'),
(4, 121212, 1, '2020-05-10', '16:36:07');
-- --------------------------------------------------------
--
-- Estrutura da tabela `lixeira`
--
CREATE TABLE `lixeira` (
`id_lixeira` int(11) NOT NULL,
`lat` float NOT NULL,
`lng` float NOT NULL,
`tipo` varchar(45) NOT NULL,
`ambiente` varchar(45) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `lixeira`
--
INSERT INTO `lixeira` (`id_lixeira`, `lat`, `lng`, `tipo`, `ambiente`) VALUES
(12345, -22.3821, -47.5461, 'Metal', 'Condomínio'),
(121212, -22.98, -23.9, 'Orgânico', 'Centro');
--
-- Índices para tabelas despejadas
--
--
-- Índices para tabela `evento`
--
ALTER TABLE `evento`
ADD PRIMARY KEY (`id_evento`),
ADD KEY `id_lixeira` (`id_lixeira`),
ADD KEY `id_usuario` (`id_usuario`);
--
-- Índices para tabela `funcionario`
--
ALTER TABLE `funcionario`
ADD PRIMARY KEY (`id_funcionario`);
--
-- Índices para tabela `historico_lixeira_sensor_capacidade`
--
ALTER TABLE `historico_lixeira_sensor_capacidade`
ADD PRIMARY KEY (`id_historico_capacidade`),
ADD KEY `id_lixeira` (`id_lixeira`);
--
-- Índices para tabela `historico_lixeira_sensor_tampa`
--
ALTER TABLE `historico_lixeira_sensor_tampa`
ADD PRIMARY KEY (`id_historico_tampa`),
ADD KEY `id_lixeira` (`id_lixeira`);
--
-- Índices para tabela `lixeira`
--
ALTER TABLE `lixeira`
ADD PRIMARY KEY (`id_lixeira`),
ADD KEY `id_lixeira` (`id_lixeira`);
--
-- AUTO_INCREMENT de tabelas despejadas
--
--
-- AUTO_INCREMENT de tabela `evento`
--
ALTER TABLE `evento`
MODIFY `id_evento` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT de tabela `historico_lixeira_sensor_capacidade`
--
ALTER TABLE `historico_lixeira_sensor_capacidade`
MODIFY `id_historico_capacidade` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT de tabela `historico_lixeira_sensor_tampa`
--
ALTER TABLE `historico_lixeira_sensor_tampa`
MODIFY `id_historico_tampa` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
MERGE INTO Semesters AS Target
USING (VALUES
('FA', 'Fall', 1),
('SP', 'Spring', 2),
('SU', 'Summer', 3)
)
AS Source (SemesterCode, SemesterName, AcademicOrder)
ON Target.SemesterCode = Source.SemesterCode
WHEN MATCHED THEN
UPDATE
SET
SemesterName = Source.SemesterName,
AcademicOrder = Sourse.AcademicOrder
WHEN NOT MATCHED BY TARGET THEN
INSERT (SemesterCode, SemesterName, AcedemicOrder)
VALUES (SemesterCode, SemesterName, AcademicOrder); |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 24, 2017 at 04:07 AM
-- 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 */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `libmanagement`
--
-- --------------------------------------------------------
--
-- Table structure for table `account`
--
CREATE TABLE `account` (
`Username` varchar(20) NOT NULL,
`Name_of_person` varchar(30) NOT NULL,
`pasword` varchar(30) NOT NULL,
`Sec_ques` tinytext NOT NULL,
`Answer` varchar(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `account`
--
INSERT INTO `account` (`Username`, `Name_of_person`, `pasword`, `Sec_ques`, `Answer`) VALUES
('Shipra ', 'ShipraRai', 'Sipra123', 'What is your childhood name?', 'Shipu'),
('Pankaj_kumar', 'Pankaj', 'pkd@1234', 'what is your Mother tounge?', 'hindi'),
('shailli_12', 'Shailendar', 'Shailli', 'what is your Mother tounge?', 'hindi');
-- --------------------------------------------------------
--
-- Table structure for table `book`
--
CREATE TABLE `book` (
`Book_Id` int(11) NOT NULL,
`Name_Of_Book` varchar(30) NOT NULL,
`Edition` int(20) NOT NULL,
`Publisher` varchar(30) NOT NULL,
`Price` int(30) NOT NULL,
`Pages` int(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `book`
--
INSERT INTO `book` (`Book_Id`, `Name_Of_Book`, `Edition`, `Publisher`, `Price`, `Pages`) VALUES
(404, 'Physics', 7, 'M L khanna', 400, 700),
(951, 'c++', 10, 'Balaguruswamy', 700, 800),
(379, 'java', 7, 'Balaguruswamy', 300, 400),
(551, 'maths', 8, 'jjlk', 789, 567),
(611, 'Biology', 7, 'NCERT', 400, 567);
-- --------------------------------------------------------
--
-- Table structure for table `issue_book`
--
CREATE TABLE `issue_book` (
`Book_Id` int(11) NOT NULL,
`Name_Of_Book` char(20) NOT NULL,
`Edition` int(20) NOT NULL,
`Publisher` char(30) NOT NULL,
`Price` int(20) NOT NULL,
`Pages` int(20) NOT NULL,
`Student_Id` varchar(30) NOT NULL,
`Date_of_Issue` varchar(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `issue_book`
--
INSERT INTO `issue_book` (`Book_Id`, `Name_Of_Book`, `Edition`, `Publisher`, `Price`, `Pages`, `Student_Id`, `Date_of_Issue`) VALUES
(404, 'Physics', 7, 'M L khanna', 400, 700, 'Pankaj_kumar', 'Dec 22, 2017'),
(551, 'maths', 8, 'jjlk', 789, 567, 'Shipra', 'Dec 23, 2017'),
(611, 'Biology', 7, 'NCERT', 400, 567, 'shailli_12', 'Dec 21, 2017'),
(123, 'physics', 8, 'shipra', 900, 200, 'Pankaj_kumar', 'Dec,22,2017');
-- --------------------------------------------------------
--
-- Table structure for table `return_book`
--
CREATE TABLE `return_book` (
`Book_Id` int(30) NOT NULL,
`Name_Of_Book` varchar(30) NOT NULL,
`Edition` int(10) NOT NULL,
`Publisher` char(30) NOT NULL,
`price` int(20) NOT NULL,
`pages` int(20) NOT NULL,
`Student_Id` varchar(30) NOT NULL,
`Date_Of_Return` varchar(30) NOT NULL DEFAULT '"Not Returned"'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `return_book`
--
INSERT INTO `return_book` (`Book_Id`, `Name_Of_Book`, `Edition`, `Publisher`, `price`, `pages`, `Student_Id`, `Date_Of_Return`) VALUES
(404, 'Physics', 7, 'M L khanna', 400, 700, 'Pankaj_kumar', 'Dec 23, 2017'),
(611, 'Biology', 7, 'NCERT', 400, 567, 'shailli_12', 'Dec 24, 2017');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `account`
--
ALTER TABLE `account`
ADD PRIMARY KEY (`Username`);
--
-- Indexes for table `book`
--
ALTER TABLE `book`
ADD PRIMARY KEY (`Book_Id`);
--
-- Indexes for table `issue_book`
--
ALTER TABLE `issue_book`
ADD PRIMARY KEY (`Book_Id`),
ADD KEY `Student_Id` (`Student_Id`);
--
-- Indexes for table `return_book`
--
ALTER TABLE `return_book`
ADD PRIMARY KEY (`Book_Id`),
ADD KEY `Student_Id` (`Student_Id`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
DROP SCHEMA IF EXISTS Superstore;
CREATE SCHEMA Superstore;
USE Superstore;
CREATE TABLE `Superstore`.customer (
customer_id int(11) NOT NULL AUTO_INCREMENT,
first_name varchar(100) NULL,
last_name varchar(100) NULL,
email varchar(100) NULL,
phone int(10) NULL,
address_id varchar(100) NOT NULL AUTO_INCREMENT,
CONSTRAINT customer_pk PRIMARY KEY (customer_id),
CONSTRAINT customer_fk FOREIGN KEY (address_id) REFERENCES `Superstore`.address(address_id)
)
ENGINE=InnoDB
DEFAULT CHARSET=latin1
COLLATE=latin1_swedish_ci
AUTO_INCREMENT=1;
CREATE TABLE `Superstore`.`order` (
order_id int(11) NOT NULL AUTO_INCREMENT,
customer_id int(11) NOT NULL AUTO_INCREMENT,
address_id int(11) NOT NULL AUTO_INCREMENT,
CONSTRAINT order_pk PRIMARY KEY (order_id),
CONSTRAINT order_fk FOREIGN KEY (customer_id) REFERENCES `Superstore`.customer(customer_id),
CONSTRAINT order_fk_1 FOREIGN KEY (address_id) REFERENCES `Superstore`.address(address_id)
)
ENGINE=InnoDB
DEFAULT CHARSET=latin1
COLLATE=latin1_swedish_ci
AUTO_INCREMENT=1;
CREATE TABLE `Superstore`.product (
product_id int(11) NOT NULL AUTO_INCREMENT,
product_name varchar(100) NULL,
description varchar(100) NULL,
weight varchar(100) NULL,
base_cost varchar(100) NULL,
CONSTRAINT product_pk PRIMARY KEY (product_id)
)
ENGINE=InnoDB
DEFAULT CHARSET=latin1
COLLATE=latin1_swedish_ci
AUTO_INCREMENT=1;
CREATE TABLE `Superstore`.product (
product_id int(11) NOT NULL AUTO_INCREMENT,
product_name varchar(100) NULL,
description varchar(100) NULL,
weight varchar(100) NULL,
base_cost varchar(100) NULL,
CONSTRAINT product_pk PRIMARY KEY (product_id)
)
ENGINE=InnoDB
DEFAULT CHARSET=latin1
COLLATE=latin1_swedish_ci
AUTO_INCREMENT=1;
CREATE TABLE `Superstore`.order_item (
order_id int(11) NOT NULL AUTO_INCREMENT,
product_id int(11) NOT NULL AUTO_INCREMENT,
quatity FLOAT NULL,
price varchar(100) NULL,
CONSTRAINT order_item_fk FOREIGN KEY (order_id) REFERENCES `Superstore`.`order`(order_id),
CONSTRAINT order_item_fk_1 FOREIGN KEY (product_id) REFERENCES `Superstore`.product(product_id)
)
ENGINE=InnoDB
DEFAULT CHARSET=latin1
COLLATE=latin1_swedish_ci
AUTO_INCREMENT=1;
CREATE TABLE `Superstore`.address (
address_id int(11) NOT NULL AUTO_INCREMENT,
street varchar(100) NULL,
city varchar(100) NULL,
state varchar(100) NULL,
zip int(7) NULL,
CONSTRAINT address_pk PRIMARY KEY (address_id)
)
ENGINE=InnoDB
DEFAULT CHARSET=latin1
COLLATE=latin1_swedish_ci;
CREATE TABLE `Superstore`.warehouse (
warehouse_id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NULL,
address_id int(11) NOT NULL AUTO_INCREMENT,
CONSTRAINT warehouse_pk PRIMARY KEY (warehouse_id),
CONSTRAINT warehouse_fk FOREIGN KEY (address_id) REFERENCES `Superstore`.address(address_id)
)
ENGINE=InnoDB
DEFAULT CHARSET=latin1
COLLATE=latin1_swedish_ci;
CREATE TABLE `Superstore`.product_warehouse (
product_id int(11) NOT NULL AUTO_INCREMENT,
warehouse_id int(11) NOT NULL AUTO_INCREMENT,
CONSTRAINT product_warehouse_fk FOREIGN KEY (product_id) REFERENCES `Superstore`.product(product_id),
CONSTRAINT product_warehouse_fk_1 FOREIGN KEY (warehouse_id) REFERENCES `Superstore`.warehouse(warehouse_id)
)
ENGINE=InnoDB
DEFAULT CHARSET=latin1
COLLATE=latin1_swedish_ci;
|
SELECT students.name as student, AVG(assignment_submissions.duration) as average_duration_time
FROM students JOIN assignment_submissions ON (students.id = student_id)
WHERE students.end_date IS NULL
GROUP BY students.name
ORDER BY average_duration_time DESC; |
# --- !Ups
CREATE TABLE notification_rule (
id serial,
tag_id INTEGER,
the_type INTEGER NOT NULL,
email text NOT NULL,
organization_id INTEGER NOT NULL,
CONSTRAINT pk_notification_rule PRIMARY KEY(id),
CONSTRAINT fk_notifiaction_rule_tag FOREIGN KEY(tag_id) references tag(id),
CONSTRAINT fk_notifiaction_rule_organization FOREIGN KEY(organization_id) references organization(id)
);
# --- !Downs
DROP TABLE notification_rule;
|
INSERT INTO `bdCinema`.`usuario`
(`idUsuario`,
`usuario`,
`senha`,
`cpf`)
VALUES
(<{idUsuario: }>,
<{usuario: }>,
<{senha: }>,
<{cpf: }>);
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 10, 2021 at 08:48 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
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_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `pw2`
--
-- --------------------------------------------------------
--
-- Table structure for table `datacenter`
--
CREATE TABLE `datacenter` (
`id` int(11) NOT NULL,
`tahun` varchar(128) NOT NULL,
`bulan` varchar(128) NOT NULL,
`bidang` varchar(128) NOT NULL,
`judul` varchar(128) NOT NULL,
`file` varchar(256) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `datacenter`
--
INSERT INTO `datacenter` (`id`, `tahun`, `bulan`, `bidang`, `judul`, `file`) VALUES
(14, '2016', 'Januari', 'Ketahanan Pangan', 'Luas Panen, Produksi dan Produktivitas Tanaman Palawija', 't1_3.pdf'),
(15, '2011', 'Januari', 'Pertanian', 'Angka Tetap Tanaman Sayur 2011', 'atap_sayur2011.pdf'),
(16, '2010', 'Maret', 'Pertanian', 'Angka Tetap Tanaman Buah 2010', 'atap_buah2010.pdf'),
(17, '2009', 'April', 'Perikanan', 'Tabel Produksi Daging di DIY', 'tabel_6_produksi_daging_kab_kota_di_diy.pdf'),
(18, '2013', 'April', 'Ketahanan Pangan', 'Luas Panen Tanaman Padi dan Palawija per sub Round', '16-18_2013_(1).pdf'),
(19, '2014', 'April', 'Ketahanan Pangan', 'Luas Panen Tanaman Padi dan Palawija per sub Round', 't4_6kota.pdf'),
(20, '2011', 'November', 'Pertanian', 'Angka Tetap Tanaman Obat tahun 2011', 'atap_tobat2011.pdf'),
(21, '2010', 'Agustus', 'Pertanian', 'Angka Tetap Tanaman Hias tahun 2010', 'atap_flori_10.pdf'),
(22, '2006', 'Juni', 'Perikanan', 'Produksi Daging, Telur dan Susu', 'hal6.pdf'),
(23, '2005', 'Juli', 'Perikanan', 'Populasi Ternak Kecil, Besar dan Unggas', 'tb1.pdf'),
(24, '2021', 'Januari', 'Pertanian', 'File coba 1', 'FILE_1.docx'),
(25, '2020', 'Februari', 'Perikanan', 'File coba 2', 'FILE_2.docx'),
(26, '2019', 'Maret', 'Ketahanan Pangan', 'File coba 3', 'FILE_3.docx'),
(27, '2018', 'April', 'Pertanian', 'File coba 4', 'FILE_4.pdf'),
(28, '2017', 'Mei', 'Perikanan', 'File coba 5', 'FILE_5.pdf'),
(29, '2021', 'Desember', 'Ketahanan Pangan', 'File coba 6 Update', 'FILE_61.pdf');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`id` int(11) NOT NULL,
`name` varchar(128) NOT NULL,
`email` varchar(128) NOT NULL,
`image` varchar(128) NOT NULL,
`password` varchar(256) NOT NULL,
`role_id` int(11) NOT NULL,
`is_active` int(1) NOT NULL,
`date_created` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `name`, `email`, `image`, `password`, `role_id`, `is_active`, `date_created`) VALUES
(1, 'Bima Pramudya Asadulloh', 'prambima@gmail.com', 'Bima-Pramudya-Asaddulloh1.jpg', '$2y$10$Rl44p5CInyd1HSNMfF8jDO576KaBeLX1V2rZSN4FilUh5Y/JDXuGi', 2, 1, 1609886667),
(2, 'Bakri Ahmad Ridhwan', 'bakri@gmail.com', 'Bakri_Ar_on_Instagram___Foto_Lawas_--__Bu6Kf4RAz5J_0(JPG).jpg', '$2y$10$dFOTFHsMrwhqK5ZWmnr/hegp7cV/X3XWKi.sQR3D04nmRYah1iB1q', 1, 1, 1609886725),
(4, 'David Dzakiy Al Maghribi', 'daviddzakiy@gmail.com', 'default.jpg', '$2y$10$8zFjw3qGPo.u4qS6o02Kcemcizp6Sft/QHXSnANdfeXlr/bX0.UxG', 2, 1, 1609898532),
(8, 'Firman Asharudin', 'firman@gmail.com', '38_AMIKOMY.png', '$2y$10$f9ty5SEdOOsHxX6tM8P4EOLeYmxOs0lUgIu/H.M2ExREbNdRv9y2q', 2, 1, 1610052627),
(20, 'Wahid Kurnia Mahardika', 'dhika@gmail.com', 'default.jpg', '$2y$10$w2.lOK0MqHJO8/dFaRbG4.YWBel0ysomyprJL0ahs8H0HhBXbpyUS', 2, 1, 1610251418),
(21, 'Rosyid Majid', 'rosyid@gmail.com', 'default.jpg', '$2y$10$upzxmdIiteQaI9TgRlWkDubD6QBMUnmQc5.wKZZXAb2k3c/iAr2pC', 2, 1, 1610251440),
(22, 'Firman Asharudin2', 'firman2@gmail.com', '38_AMIKOMY1.png', '$2y$10$zDNYEFMsUoDCfAKp/WPRdegkPdL5dHoWzmrFoAOMTxQ0yl8OoPybm', 1, 1, 1610252508),
(23, 'Testing testing', 'testing@gmail.com', 'default.jpg', '$2y$10$DBuNOBac2ZSvId6OcGIBHO0w5r94/VgINZN6XmDjyQPOFDLs.H076', 2, 1, 1610305850);
-- --------------------------------------------------------
--
-- Table structure for table `user_access_menu`
--
CREATE TABLE `user_access_menu` (
`id` int(11) NOT NULL,
`role_id` int(11) NOT NULL,
`menu_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `user_access_menu`
--
INSERT INTO `user_access_menu` (`id`, `role_id`, `menu_id`) VALUES
(1, 1, 1),
(2, 1, 2),
(3, 2, 2),
(4, 1, 3),
(6, 1, 5),
(7, 2, 5);
-- --------------------------------------------------------
--
-- Table structure for table `user_menu`
--
CREATE TABLE `user_menu` (
`id` int(11) NOT NULL,
`menu` varchar(128) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `user_menu`
--
INSERT INTO `user_menu` (`id`, `menu`) VALUES
(1, 'Admin'),
(2, 'User'),
(3, 'Menu'),
(5, 'Data Center'),
(7, 'Testing'),
(8, 'Testing Update 2');
-- --------------------------------------------------------
--
-- Table structure for table `user_role`
--
CREATE TABLE `user_role` (
`id` int(11) NOT NULL,
`role` varchar(128) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `user_role`
--
INSERT INTO `user_role` (`id`, `role`) VALUES
(1, 'Administrator'),
(2, 'Member'),
(3, 'Mahasiswa Test'),
(5, 'Dosen'),
(8, 'Testing');
-- --------------------------------------------------------
--
-- Table structure for table `user_sub_menu`
--
CREATE TABLE `user_sub_menu` (
`id` int(11) NOT NULL,
`menu_id` int(11) NOT NULL,
`title` varchar(128) NOT NULL,
`url` varchar(128) NOT NULL,
`icon` varchar(128) NOT NULL,
`is_active` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `user_sub_menu`
--
INSERT INTO `user_sub_menu` (`id`, `menu_id`, `title`, `url`, `icon`, `is_active`) VALUES
(1, 1, 'Dashboard', 'admin', 'fas fa-home', 1),
(2, 2, 'My Profile', 'user/tampilkanProfil', 'fas fa-user', 1),
(3, 2, 'Edit Profile', 'user/edit', 'fas fa-user-edit', 1),
(4, 3, 'Menu Management', 'menu', 'fas fa-folder', 1),
(5, 3, 'Submenu Management', 'menu/submenu', 'fas fa-folder-open', 1),
(7, 1, 'Role', 'admin/role', 'fas fa-fw fa-user-tie', 1),
(8, 2, 'Change Password', 'user/changepassword', 'fas fa-key', 1),
(9, 5, 'Data', 'user/tampilkanData', 'fas fa-database', 1),
(10, 1, 'Management Data', 'admin/mUser', 'fas fa-users', 1),
(12, 1, 'Coba', 'coba/coba', 'fab fa-youtube', 0);
-- --------------------------------------------------------
--
-- Table structure for table `user_token`
--
CREATE TABLE `user_token` (
`id` int(11) NOT NULL,
`email` varchar(128) NOT NULL,
`token` varchar(128) NOT NULL,
`date_created` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `datacenter`
--
ALTER TABLE `datacenter`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user_access_menu`
--
ALTER TABLE `user_access_menu`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user_menu`
--
ALTER TABLE `user_menu`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user_role`
--
ALTER TABLE `user_role`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user_sub_menu`
--
ALTER TABLE `user_sub_menu`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user_token`
--
ALTER TABLE `user_token`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `datacenter`
--
ALTER TABLE `datacenter`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
--
-- AUTO_INCREMENT for table `user_access_menu`
--
ALTER TABLE `user_access_menu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `user_menu`
--
ALTER TABLE `user_menu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `user_role`
--
ALTER TABLE `user_role`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `user_sub_menu`
--
ALTER TABLE `user_sub_menu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `user_token`
--
ALTER TABLE `user_token`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
INSERT INTO InstitutionType( kod, name) VALUES( '300', 'Centri socijalne skrbi');
INSERT INTO InstitutionType( kod, name) VALUES( '469', 'Domovi za starije i nemoćne osobe (domovi čiji je osnivač županija)');
INSERT INTO InstitutionType( kod, name) VALUES( '470', 'Domovi za starije i nemoćne osobe (domovi drugih osnivača)');
INSERT INTO InstitutionType( kod, name) VALUES( '471', 'Domovi za psihički bolesne odrasle osobe (domovi čiji je osnivač Republika Hrvatska)');
INSERT INTO InstitutionType( kod, name) VALUES( '474', 'Domovi za psihički bolesne odrasle osobe (domovi drugih osnivača)');
INSERT INTO InstitutionType( kod, name) VALUES( '475', 'Domovi za tjelesno ili mentalno oštećene osobe (domovi čiji je osnivač Republika Hrvatska)');
INSERT INTO InstitutionType( kod, name) VALUES( '476', 'Domovi za tjelesno ili mentalno oštećene osobe (domovi drugih osnivača)');
INSERT INTO InstitutionType( kod, name) VALUES( '477', 'Domovi za djecu bez odgovarajuće roditeljske skrbi (domovi čiji je osnivač Republika Hrvatska)');
INSERT INTO InstitutionType( kod, name) VALUES( '478', 'Domovi za djecu bez odgovarajuće roditeljske skrbi (domovi drugih osnivača)');
INSERT INTO InstitutionType( kod, name) VALUES( '479', 'Domovi za djecu s poremećajima u ponašanju (domovi čiji je osnivač Republika Hrvatska)');
INSERT INTO County( kod, name) VALUES( 'BBZ', 'Bjelovarsko-bilogorska županija');
INSERT INTO County( kod, name) VALUES( 'BPZ', 'Brodsko-posavska županija');
INSERT INTO County( kod, name) VALUES( 'DNZ', 'Dubrovačko-neretvanska županija');
INSERT INTO County( kod, name) VALUES( 'GZG', 'Grad Zagreb');
INSERT INTO County( kod, name) VALUES( 'IZ', 'Istarska županija');
INSERT INTO County( kod, name) VALUES( 'KZ', 'Karlovačka županija');
INSERT INTO County( kod, name) VALUES( 'KKZ', 'Koprivničko-križevačka županija');
INSERT INTO County( kod, name) VALUES( 'KZZ', 'Krapinsko-zagorska županija');
INSERT INTO County( kod, name) VALUES( 'LSZ', 'Ličko-senjska županija');
INSERT INTO County( kod, name) VALUES( 'MZ', 'Međimurska županija');
INSERT INTO County( kod, name) VALUES( 'OBZ', 'Osječko-baranjska županija');
INSERT INTO County( kod, name) VALUES( 'PSZ', 'Požeško-slavonska županija');
INSERT INTO County( kod, name) VALUES( 'PGZ', 'Primorsko-goranska županija');
INSERT INTO County( kod, name) VALUES( 'SMZ', 'Sisačko-moslavačka županija');
INSERT INTO County( kod, name) VALUES( 'SDZ', 'Splitsko-dalmatinska županija');
INSERT INTO County( kod, name) VALUES( 'SKZ', 'Šibensko-kninska županija');
INSERT INTO County( kod, name) VALUES( 'VZ', 'Varaždinska županija');
INSERT INTO County( kod, name) VALUES( 'VPZ', 'Virovitičko-podravska županija');
INSERT INTO County( kod, name) VALUES( 'VSZ', 'Vukovarsko-srijemska županija');
INSERT INTO County( kod, name) VALUES( 'ZDZ', 'Zadarska županija');
INSERT INTO County( kod, name) VALUES( 'ZGZ', 'Zagrebačka županija');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'BBZ', 'Centar za socijalnu skrb Bjelovar', 'J.J. Strossmayera 2
43 000 Bjelovar', '043/247-260 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'BBZ', 'Centar za socijalnu skrb Čazma', 'Trg čazmanskog kaptola 6
43240 Čazma', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'BBZ', 'Centar za socijalnu skrb Daruvar', 'Radićeva 5/1
43 500 Daruvar', '043/331-868; 043/331-083 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'BBZ', 'Podružnica Grubišno Polje', 'M. A. Reljkovića 26
43 290 Grubišno Polje', '043/485-179');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'BBZ', 'Centar za socijalnu skrb Garešnica', 'Vladimira Nazora 13
43280 Garešnica', '043/531-189 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'BBZ', 'Podružnica Grubišno Polje', 'M. A. Reljkovića 26
43 290 Grubišno Polje', '043/485-179 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'BBZ', 'Podružnica Pitomača', 'Trg kralja
Tomislava bb', '033/783-045 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'BPZ', 'Centar za socijalnu skrb Nova Gradiška', 'Karla Dieneša 4/1
35 400 N. Gradiška', '035/362-611 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'BPZ', 'Centar za socijalnu skrb Slavonski Brod', 'Naselje Slavonija I, bb
35 000 Sl. Brod', '035/213-700 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'DNZ', 'Centar za socijalnu skrb Dubrovnik', 'Miha Pracata 11
20 000 Dubrovnik
p.p. 90', '020/323-899, 020/414-700 i 020/414-711 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'DNZ', 'Centar za socijalnu skrb Korčula', 'Šetalište Frana Kršinića 50
20 260 Korčula', '020/715-854 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'DNZ', 'Centar za socijalnu skrb Metković', 'Ante Starčevića 25
20 350 Metković', '020/690-999 (020/690-981, 82...89) ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'DNZ', 'Centar za socijalnu skrb Ploče', 'Dalmatinska 4
20 340 Ploče', '020/679-071 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Centar za socijalnu skrb Zagreb', 'Eugena Kumičića 5
10 000 Zagreb', '01/4550-849; 01/4550-813; 01/4550-220; 01/4550-644; 01/4550-671 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Trnje', 'Cvijete Zuzorić 53', '01/6112-284; 01/6150-186; 01/6150-185');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Trešnjevka', 'Vitezićeva 57', '01/3639-717; 01/3639-733; 01/3639-723; 01/3639-785');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Susedgrad', 'Aleja Bologne 2
Susedgrad', '01/3454-038; 01/3454-039');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Sesvete', 'Trg D. Domjanića 6
10260 Sesvete', '01/2002-062; 01/2002-068');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Pešćenica', 'Zapoljska 1', '01/6100-203');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Novi Zagreb', 'Av. Dubrovnik 12', '01/6585-555;');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Medveščak', 'Trg Burze 2', '01/4810-481; 01/4810-475');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Maksimir', 'Maksimirska 51', '01/2332-792; 01/2335-883; 01/2342-306; 01/2342-307');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Dubrava', 'Avenija Dubrava 47', '01/2988-501; 01/2988-502 ; 01/2988-503 ; 01/2991-617');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Črnomerec', 'Ilica 259', '01/3777-150; 01/3750-010');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Centar', 'Haulikova 6/II', '01/4577-211');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Centar', 'Haulikova 6/II', '01/4577-211 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Črnomerec', 'Ilica 259', '01/3777-150; 01/3750-010 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Dubrava', 'Avenija Dubrava 47', '01/2988-501; 01/2988-502 ; 01/2988-503 ; 01/2991-617 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Maksimir', 'Maksimirska 51', '01/2332-792; 01/2335-883; 01/2342-306; 01/2342-307 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Medveščak', 'Trg Burze 2', '01/4810-481; 01/4810-475 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Novi Zagreb', 'Av. Dubrovnik 12', '01/6585-555; ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Pešćenica', 'Zapoljska 1', '01/6100-203 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Sesvete', 'Trg D. Domjanića 6
10260 Sesvete', '01/2002-062; 01/2002-068 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Susedgrad', 'Aleja Bologne 2
Susedgrad', '01/3454-038; 01/3454-039 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Trešnjevka', 'Vitezićeva 57', '01/3639-717; 01/3639-733; 01/3639-723; 01/3639-785 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'GZG', 'Ured Trnje', 'Cvijete Zuzorić 53', '01/6112-284; 01/6150-186; 01/6150-185 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'IZ', 'Centar za socijalnu skrb Buje', 'Rudine 1
52 460 Buje', '052/772-036; 052/772-024 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'IZ', 'Centar za socijalnu skrb Labin', 'Istarska 1
52 220 Labin', '052/856-522; 052/856-464 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'IZ', 'Centar za socijalnu skrb Pazin', 'Prolaz Otokara Keršovanija 2
52 400 Pazin', '052/624-433; 052/624-497 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'IZ', 'Podružnica Buzet', 'II. Istarske brigade 11
52 420 Buzet', '052/662-523');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'IZ', 'Centar za socijalnu skrb Poreč', 'dr. Maura Gioseffia 2b,
52 440 Poreč', '052/451-657; 052/432-011 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'IZ', 'Centar za socijalnu skrb Pula', 'Sergijevaca 2
52100 Pula', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'IZ', 'Centar za socijalnu skrb Rovinj', 'Carera 21/II
52 210 Rovinj', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZ', 'Centar za socijalnu skrb Duga Resa', 'Ul.137. brigade 3
47 250 Duga Resa', '047/844-247 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZ', 'Centar za socijalnu skrb Karlovac', 'I. Meštrovića 10
47 000 Karlovac', '047/415-459; 047/415-462; 047/415-458 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZ', 'Podružnica Vojnić', 'Trg Stjepana Radića 1,
47 220 Vojnić', '047/883-058');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZ', 'Podružnica Ozalj', 'Kurilovac 8
47 280 Ozalj', '047/731-854');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZ', 'Centar za socijalnu skrb Ogulin', 'Vijenac Ive Marinkovića 1
47 300 Ogulin', '047/522-042 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZ', 'Centar za socijalnu skrb Slunj', 'Školska 2
47 240 Slunj', '047/777-107 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KKZ', 'Centar za socijalnu skrb Đurđevac', 'Gajeva 6
48350 Đurđevac', '048/812-612; 048/812-614 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KKZ', 'Centar za socijalnu skrb Koprivnica', 'Trg Eugena Kumičića 2
48 000 Koprivnica', '048/642-247; 048/642-248 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KKZ', 'Centar za socijalnu skrb Križevci', 'Bana Josipa Jelačića 5
48 260 Križevci', '048/711-710 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZZ', 'Centar za socijalnu skrb Donja Stubica', 'Starogradska 3
49 240 Donja Stubica', '049/286-157 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZZ', 'Centar za socijalnu skrb Krapina', 'Frana Galovića bb
49 230 Krapina
p.p. 19', '049/371-847; 049/370-847 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZZ', 'Podružnica Pregrada', 'Kostelgradska 5
49 218 Pregrada', '049/376-029; 049/376-099');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZZ', 'Centar za socijalnu skrb Zabok', 'Matije Gupca 53
49 210 Zabok', '049/221-346; 049/223-392 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZZ', 'Podružnica Klanjec', 'Trg mira 11
49 290 Klanjec', '049/550-031');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'KZZ', 'Centar za socijalnu skrb Zlatar Bistrica', 'S. Radića 2
49247 Zlatar Bistrica', '049/461-805 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'LSZ', 'Centar za socijalnu skrb Gospić', 'Vile Velebita 6
53 000 Gospić', '053/741-110 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'LSZ', 'CZSS Gospić - Podružnica Korenica', 'Josipa Jovića 16
53 230 Korenica', '053/756-252');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'LSZ', 'Centar za socijalnu skrb Senj', 'V. Novaka 4
53 270 Senj', '053/882-929; 053/882-930 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'LSZ', 'Podružnica Otočac', 'Kralja Zvonimira 8
53 220 Otočac', '053/773-022; 053/773-306');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'LSZ', 'CZSS Gospić - Podružnica Korenica', 'Josipa Jovića 16
53 230 Korenica', '053/756-252 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'MZ', 'Centar za socijalnu skrb Čakovec', 'Vladimira Nazora 16
40300 Čakovec', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'MZ', 'CZSS Čakovec - Podružnica Prelog', 'Kralja Zvonimira 9
40323 Prelog', '040/646-573');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'MZ', 'CZSS Čakovec - Podružnica Prelog', 'Kralja Zvonimira 9
40323 Prelog', '040/646-573 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'OBZ', 'Centar za socijalnu skrb Beli Manastir', 'Kralja Tomislava 37
31300 Beli Manastir', '031/705-155 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'OBZ', 'Centar za socijalnu skrb Donji Miholjac', 'Vukovarska 7
31540 Donji Miholjac', '031/631-525 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'OBZ', 'Centar za socijalnu skrb Đakovo', 'P. Preradovića 2a
31 400 Đakovo', '031/813-331; 031/812-152 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'OBZ', 'Centar za socijalnu skrb Našice', 'Pejačevićev trg 8
34 500 Našice', '031/617-191; 031/613-411 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'OBZ', 'Centar za socijalnu skrb Osijek', 'Lorenza Jagara 12
31 000 Osijek', '031/212-400 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'OBZ', 'Centar za socijalnu skrb Valpovo', 'Matije Gupca 11
31 550 Valpovo', '031/651-123; 031/651-920 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PSZ', 'Centar za socijalnu skrb Pakrac', 'Petra Preradovića 1
34550 Pakrac', '034/411-546 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PSZ', 'Centar za socijalnu skrb Požega', 'Istarska 2
34 300 Požega', '034/273-807 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PGZ', 'Centar za socijalnu skrb Cres-Lošinj', 'Riva lošinjskih kapetana 13/1
51550 Mali Lošinj
Creskog statuta 15
51557 Cres', '051/231-076, 051/571-527 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PGZ', 'Cres', 'Creskog statuta 15
51 557 Cres', '');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PGZ', 'Centar za socijalnu skrb Crikvenica', 'Gorica-Braće Cvetića 2
51260 Crikvenica', '051/784-270 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PGZ', 'Podružnica Rab', 'Biskupa draga 2
51 280 Rab', '');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PGZ', 'Centar za socijalnu skrb Krk', 'Vršanska 21A
51 500 Krk', '051/880-700 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PGZ', 'Centar za socijalnu skrb Opatija', 'Stubište Baredine 10/I
51410 Opatija', '051/703-057; 051/703-058; 051/701-493 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PGZ', 'Centar za socijalnu skrb Rijeka', 'Laginjina 11/a
51 000 Rijeka', '051/226-586 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PGZ', 'Podružnica Vrbovsko', 'Dobra 6
51 326 Vrbovsko', '051/875-520');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PGZ', 'Podružnica Čabar', 'Trg K. Tomislava 9
51 306 Čabar', '051/821-084');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PGZ', 'Podružnica Delnice', 'Školska 22
51 300 Delnice', '051/811-402; 051/811-634');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'PGZ', 'Podružnica Rab', 'Biskupa draga 2
51 280 Rab', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SMZ', 'Centar za socijalnu skrb Glina', 'Trg dr. FranjeTuđmana 24
Glina', '044/811-660 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SMZ', 'Podružnica Topusko', 'Trg bana J. Jelačića 14
44 415 Topusko', '');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SMZ', 'Centar za socijalnu skrb Hrvatska Kostajnica', 'Kralja Tomislava bb
44 430 Hrvatska Kostajnica', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SMZ', 'Centar za socijalnu skrb Kutina', 'Stjepana Radića 7a
44 320 Kutina', '044/683-603 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SMZ', 'Centar za socijalnu skrb Novska', 'Trg Đure Szabe 7
44 330 Novska', '044/600-672 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SMZ', 'Centar za socijalnu skrb Petrinja', 'Turkulinova 7
44 250 Petrinja', '044/815-272 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SMZ', 'Centar za socijalnu skrb Sisak', 'Ulica lipa 11
44 000 Sisak', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SMZ', 'Podružnica Dvor', 'Trg bana J. Jelačića15
44 440 Dvor', '044/871-325; 044/871-130');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Centar za socijalnu skrb Imotski', 'Bruna Bušića 6
21 260 Imotski', '021/841-421; 021/842-241 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Centar za socijalnu skrb Makarska', 'PTC “Sv. Nikola”
Ul kipara Meštrovića 2a,
21300 Makarska
p.p. 80', '021/611-544 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Podružnica Vrgorac', 'Ul. A.G. Matoša 1
21276 Vrgorac', '021/674-077; 021/674-343');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Centar za socijalnu skrb Omiš', 'Četvrt Ribnjak bb
21 310 Omiš', '021/864-470 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Centar za socijalnu skrb Sinj', 'Zankova glavica 2
21 230 Sinj', '021/821-446 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Centar za socijalnu skrb Split', 'Gundulićeva 22
21 000 Split', '021/380-155; 021/380-150; 021/380-157; 021/380-151 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Podružnica Vis', 'Trg 30. svibnja 92 br. 2
21 480 Vis', '021/711-875');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Podružnica Hvar', 'Fabrika bb
Hvar', '021/742-411; 021/743-015');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Podružnica Solin', 'Hektorovićeva 38
21 210 Solin', '021/244-106');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Podružnica Kaštela', 'Fuležina 1
21 216 Kaštel Stari', '021/230-944');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Centar za socijalnu skrb Supetar-Brač', 'M. Vodanovića 18
21 400 Supetar', '021/631-314; 021/631-031 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Centar za socijalnu skrb Trogir', 'Hrvatskih mučenika 6
21 220 Trogir', '021/881-988 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SDZ', 'Podružnica Solin', 'Hektorovićeva 38
21 210 Solin', '021/244-106 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SKZ', 'Centar za socijalnu skrb Drniš', 'Kardinala A. Stepinca 4
22 320 Drniš', '022/886-042 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SKZ', 'Centar za socijalnu skrb Knin', 'G. Šuška 4
22 300 Knin', '022/664-480 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'SKZ', 'Centar za socijalnu skrb Šibenik', 'Petra Grubišića 3
22 000 Šibenik', '022/201-222 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VZ', 'Centar za socijalnu skrb Ivanec', 'Đure Arnolda 11
42 240 Ivanec', '042/781-353; 042/771-770 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VZ', 'Centar za socijalnu skrb Ludbreg', 'Kardinala Franje Kuharića 12
42 230 Ludbreg', '042/332-840 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VZ', 'Centar za socijalnu skrb Novi Marof', 'Zagorska 28
42 220 Novi Marof', '042/613-600 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VZ', 'Centar za socijalnu skrb Varaždin', 'Nazorova 22
42 000 Varaždin', '042/303-900 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VPZ', 'Centar za socijalnu skrb Slatina', 'V. Nazora 5/1
33 516 Slatina', '033/551-158 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VPZ', 'Podružnica Orahovica', 'K. Zvonimira 51
33 515 Orahovica', '033/673-735; 033/674-495');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VPZ', 'Centar za socijalnu skrb Virovitica', 'A. Šenoe 1
33 000 Virovitica', '033/721-530; 033/722-834 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VPZ', 'Podružnica Pitomača', 'Trg kralja
Tomislava bb', '033/783-045');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VSZ', 'Centar za socijalnu skrb Vinkovci', 'Glagoljaška 31 E
32 000 Vinkovci', '032/332-315 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VSZ', 'Centar za socijalnu skrb Vukovar', 'Županijska 13
32 010 Vukovar
p.p. 77', '032/450-922; 032/450-920 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VSZ', 'CZSS Vukovar - Podružnica Ilok', 'Strossmayerova 590
32236 Ilok', '032/590-098, 032/590-244');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VSZ', 'Centar za socijalnu skrb Županja', 'dr. Franje Račkog 30c
32 270 Županja', '032/831-328; 032/832-160 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'VSZ', 'CZSS Vukovar - Podružnica Ilok', 'Strossmayerova 590
32236 Ilok', '032/590-098, 032/590-244 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZDZ', 'Centar za socijalnu skrb Benkovac', 'Ivana Meštrovića 8
23 420 Benkovac', '023/681-133 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZDZ', 'Centar za socijalnu skrb Biograd na moru', 'Trg kralja Tomislava 16,
23 210 Biograd', '023/383-472 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZDZ', 'Centar za socijalnu skrb Zadar', 'Andrije Hebranga 1
23 000 Zadar', '023/ 230-392 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZDZ', 'Podružnica Pag', 'Šetalište grada Zanea 1
23 250 Pag', '023/611-320');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZDZ', 'Podružnica Obrovac', 'Ante Starčevića 8
23 450 Obrovac', '023/689-060; 023/689-261');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZDZ', 'Podružnica Gračac', 'Školska ul. bb
23 440 Gračac', '023/773-446; 023/773-076');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZDZ', 'Podružnica Pag', 'Šetalište grada Zanea 1
23 250 Pag', '023/611-320 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZGZ', 'Centar za socijalnu skrb Dugo Selo', 'Josipa Zorića 1
10 370 Dugo Selo', '01/2753-209 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZGZ', 'Centar za socijalnu skrb Ivanić Grad', 'Franje Jurinca 6
10 310 Ivanić Grad', '01/2882-301; 01/2882-302 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZGZ', 'Centar za socijalnu skrb Jastrebarsko', 'Trg Ljube Babića 29
10 420 Jastrebarsko', '01/6281-482 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZGZ', 'Centar za socijalnu skrb Samobor', 'Zagorska 1
10 430 Samobor', '01/3362-702 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZGZ', 'Centar za socijalnu skrb Sv. Ivan Zelina', 'Braće Radića 2
10 380 Sv. Ivan Zelina', '01/2060-114; 01/2060-617 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZGZ', 'Centar za socijalnu skrb Velika Gorica', 'Trg kralja Tomislava 35
10410 Velika Gorica', '01/6222-666; 01/6222-216 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZGZ', 'Centar za socijalnu skrb Vrbovec', 'Trg Petra Zrinskog 23
10 216 Vrbovec', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '300', 'ZGZ', 'Centar za socijalnu skrb Zaprešić', 'Drage Kodrmana 3a
10 211 Zaprešić', '01/3310-399; 01/3310-450 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'BBZ', 'Dom za starije i nemoćne osobe - Bjelovar', 'Vlahe Paljetka 1
43000 Bjelovar', '043/631-500 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'BBZ', 'Dom za starije i nemoćne osobe "Ljudevite pl. Janković" Daruvar', 'Samostanski prilaz 4
43500 Daruvar', '043/331-702 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'BPZ', 'Dom za starije i nemoćne osobe - Slavonski Brod', 'Kraljice Jelene bb
35000 Sl. Brod', '035/448-511 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'DNZ', 'Dom za starije i nemoćne osobe - Dubrovink', 'Dr. A. Starčevića 33
20000 Dubrovnik', '020/416-530 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'DNZ', 'Dom za starije i nemoćne osobe "Domus Christi"', 'Za Rokom 13
20000 Dubrovnik', '020/323-380');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'DNZ', 'Dom za starije i nemoćne osobe - Korčula', 'Ul. 58 br. 2
20260 Korčula', '020/711-606 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'DNZ', 'Dom za starije i nemoćne osobe - Vela Luka', 'Obala 3 br. 1
20270 Vela Luka', '020/812-747');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'GZG', 'Dom za starije i nemoćne osobe - Centar - Zagreb', 'Klaićeva 10/Crnatkova 14
10 000 Zagreb', '4924-100 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'GZG', 'Dom za starije i nemoćne osobe - Trešnjevka', 'Trg Slavoljuba Penkale 1', '3659-555');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'GZG', 'Dom za starije i nemoćne osobe - Trnje', 'Poljička ulica 12', '01/61-51-300');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'GZG', 'Dom za starije i nemoćne osobe - Sveti Josip', 'Dunjevac 17', '3745-444');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'GZG', 'Dom za starije i nemoćne osobe - Sveta Ana', 'Islandska 2', '6600-655');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'GZG', 'Dom za starije i nemoćne osobe - Peščenica', 'D. Svetice 89', '2302-166');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'GZG', 'Dom za starije i nemoćne osobe - Medvešćak', 'Trg D. Iblera 8', '4612-333');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'GZG', 'Dom za starije i nemoćne osobe - Maksimir', 'Hegedušićeva 20', '2351-111');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'GZG', 'Dom za starije i nemoćne osobe - Ksaver', 'Nemetova 2', '4674-133');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'GZG', 'Dom za starije i nemoćne osobe - Dubrava', 'M. Gavazzija 26', '2851-552');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'GZG', 'Dom za starije i nemoćne osobe - Trnje', 'Poljička ulica 12', '01/61-51-300 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'IZ', 'Dom za starije i nemoćne osobe - Casa per anziani e disabili Cittanova - Novigrad', 'Domovinskih žrt. bb
52466 Novigrad', '052/729-020 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'IZ', 'Dom za starije i nemoćne osobe - Raša', 'Ul. N. Tesle 1
52223 Raša', '052/874-243 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'IZ', 'Dom za starije i nemoćne osobe "Domenico Pergolis" - Rovinj (Casa per anziani e disabili "Domenico Pergolis" - Rovigno)', 'Carducci 18
52210 Rovinj', '052/845-000 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'IZ', 'Dom za starije i nemoćne osobe “Alfredo Štiglić” - Pula', 'Miroslava Krleže 33
52000 Pula', '052/392-448 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'KZ', 'Dom za starije i nemoćne osobe - Sveti Antun - Karlovac', 'Kukuljevićeva 2
47000 Karlovac', '047/542-700 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'KKZ', 'Dom za starije i nemoćne osobe - Koprivnica', 'Trg E. Kumičića 17
43300 Koprivnica', '048/250-200 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'LSZ', 'Dom za starije i nemoćne osobe - Gospić', 'Lavoslava Vukelića
46148 Gospić', '053/572-813 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'LSZ', 'Dom za starije i nemoćne osobe - Udbina', 'Krbavska 1
53234 Udbina', '053/778-272 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'MZ', 'Dom za starije i nemoćne osobe - Čakovec', 'Matice Hrvatske 1
40000 Čakovec', '040/370-333 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'OBZ', 'Dom za starije i nemoćne osobe - Beli Manastir', 'Bana Jelačića 108
31300 Beli Manastir', '031/702-110 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'OBZ', 'Dom za starije i nemoćne osobe - Đakovo', 'P. Preradovića 2a
21400 Đakovo', '031/811-392 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'OBZ', 'Dom za starije i nemoćne osobe - Osijek', 'Drinska 10
31000 Osijek', '031/275-455 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'PSZ', 'Dom za starije i nemoćne osobe - Požega', 'Istarska bb
34000 Požega', '034/271-311 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'PSZ', 'Dom za starije i nemoćne osobe - Velika', 'Luke Ibrišimovića 7
34330 Velika', '034/233-085 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'PGZ', 'Dom za starije i nemoćne osobe "Kantrida" - Rijeka', 'Đ. Catti 6
51000 Rijeka', '051/612-100 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'PGZ', 'Dom za starije i nemoćne osobe "Mali Karatec" - Krk', 'Ul. L. Bolmarčića 1
51500 Krk', '051/221-934 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'PGZ', 'Dom za starije i nemoćne osobe "Volosko" - Opatija', 'Ul. M. Tita 34
51410 Opatija', '051/701-013 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'PGZ', 'Dom za starije i nemoćne osobe “Marko A. Stuparić” - Veli Lošinj', 'V. Nazora 40
51551 Veli Lošinj', '051/236-230 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'SMZ', 'Dom za starije i nemoćne osobe - Petrinja', 'Trg narodnih učitelja 7,
44 250 Petrinja', '044/525-525 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'SMZ', 'Dom za starije i nemoćne osobe - Sisak', 'Oktavijana Augusta 3
44000 Sisak', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'SDZ', 'Dom za starije i nemoćne osobe - Makarska', 'Kalalarga 31
21300 Makarska', '021/615-355 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'SDZ', 'Podružnica Runovići - Imotski', 'Runovići', '021/849-097');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'SDZ', 'Dom za starije i nemoćne osobe - Split', 'Ivana pl. Zajca 2
21000 Split', '021/401-888 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'SDZ', 'Dom za starije i nemoćne osobe "Lovret"', 'Starčevićeva 19
21000 Split', '021/329-200');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'SDZ', 'Dom za starije i nemoćne osobe - Vis', 'S. S. Kranjčevića 4
21480 Vis', '021/711-113 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'SKZ', 'Dom za starije i nemoćne osobe - Knin', 'Kneza Domagoja 5
Knin', '022/660-994 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'SKZ', 'Dom za starije i nemoćne osobe "Cvjetni dom" - Šibenik', 'Njegošev trg 2F
22000 Šibenik', '022/3118-888 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'VZ', 'Dom za starije i nemoćne osobe - Varaždin', 'Zavojna 6
42000 Varaždin', '042/407-100 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'VSZ', 'Dom za starije i nemoćne osobe - Vinkovci', 'N. Tesle 43
32100 Vinkovci', '032/369-884 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'VSZ', 'Dom za starije i nemoćne osobe - Vukovar', 'Naštar
V. Lisinskog 1', '032/387-040 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '469', 'ZDZ', 'Dom za starije i nemoćne osobe - Zadar', 'Kneza Trpimira 21
23000 Zadar', '023/332-033 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'BBZ', 'Dom za starije i nemoćne osobe "Moj Mir" - Bjelovar', 'M. Šuffaya 25
43000 Bjelovar', '043-247-976 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'BPZ', 'Dom socijalne skrbi za starije i nemoćne "Gostinac" - Rešetari', 'Kralja Tomislava bb
35403 Rešetari', '035/367-785 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne osobe "Park" - Zagreb', 'Ivanićgradska 52
10 000 Zagreb', '01/2333-422 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne "Bene Vita" - Zagreb', 'Gornji Bukovac 19/D
10 000 Zagreb', '01/234-1922 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne "Jurakić" - Zagreb', 'Žitnjak 67
10 000 Zagreb', '01/2408-536 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne "Novak" - Zagreb', 'Sunčana 14
Granešina
10 000 Zagreb', '01/298-4173 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne "Pejaković" - Zagreb', 'I. Petruševec 24/c
10 000 Zagreb', '01/237-1558 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne "Trag-plus" - Zagreb', 'Osekovska 18
10 000 Zagreb', '01/2311-475 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne osobe "Av-Vitalis" - Zagreb', 'Vogelska 18
10 000 Zagreb', '01/3466-280 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne osobe "Branovečina" - Zagreb', 'Branovečina 17
10 000 Zagreb', '01/2983-416 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne osobe "Dom Marijan" - Sesvete', 'Žerjavinečka 13
10360 Sesvete', '01/2013-567 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne osobe "Godan" - Zagreb', 'Sermageova 16
10 000 Zagreb', '01/2335-013; 098/723-994 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'dislocirani objekt', 'Srebrnjak 90a
10 000 Zagreb', '2430-982');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne osobe "Gornji Grad" - Zagreb', 'Šublinov brijeg 20b
10 000 Zagreb', '01/4851-422 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne osobe "Ivana" - Dubrava', 'Trg slobode 10
10342 Dubrava', '01/2726-454 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne osobe "Kuća sv. Franje" - Odra', 'Sv. Izidora 5
10 000 Odra', '01/6269-300 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne osobe "Stara Vlaška" - Zagreb', 'Vlaška 17
10 000 Zagreb', '01/4818-141 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom za starije i nemoćne osobe "Tolić" - Zagreb', 'Ježdovečka 108/E
10 000 Zagreb', '01/6526-698 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'GZG', 'Dom zaklade Lavoslava Schwarza - Zagreb', 'Bukovačka 55
10 000 Zagreb', '01/2421-544 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'KZ', 'Dom za starije i nemoćne “Biskup Srećko Badurina” - Ogulin', 'Bolnička 38
47300 Ogulin', '047/531-752 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'KZ', 'Dom za starije i nemoćne osobe "Viktorovski" - Ozalj', 'Vivodina 2/b
47280 Ozalj', '047-753-141 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'KKZ', '"Ruklin d.o.o" - Križevci', 'Čabraji 36
48260 Križevci', '048/697-050 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'KKZ', 'Dom za starije i nemoćne osobe "Dom sestre Jadranke" - Kloštar Vojakovački', 'Čabraji 36
48264 Kloštar Vojakovački', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'KZZ', 'Dom za smještaj starijih i nemoćnih osoba "Rezidencija Kastelan" - Tuheljske toplice', 'Bolnička 2
Tuheljske toplice', '049/557-666 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'KZZ', 'Dom za starije i nemoćne osobe "Sveti Nikola" - Krapina', 'Magistratska 10
49000 Krapina', '049-371-580 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'KZZ', 'Ustanova "PIintar" – dom za starije i nemoćne osobe - Stubičke Toplice', 'Zagrebačka 7
49244 Stubičke Toplice', '049-282-069 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'LSZ', 'Dom za starije i nemoćne "Otočac" - Otočac', 'V. Nazora 14
53220 Otočac', '053/746-159 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'MZ', 'Centar za pomoć i njegu "Mesmar" - Prelog', 'D. Domjanića 21
40323 Prelog', '040/646-788 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'MZ', 'Dom umirovljenika "Ščavničar" - Selnica', 'Jelačićev trg 5
40314 Selnica', '040/861-157 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'MZ', 'Dom za starije i nemoćne osobe "Hodošan"', 'Čakovečka 6
40320 Donji Kraljevec', '040-679-368 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'MZ', 'Dom za starije i nemoćne osobe "Kotoriba" - Kotoriba', 'Kolodvorska 16
40329 Kotoriba', '040/682-806 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'MZ', 'Dom za starije i nemoćne osobe "Slakovec" - Nedelišće', 'Slakovec 70
40305 Nedelišće', '040/829-181 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'MZ', 'Dom za starije i nemoćne osobe "Stubičar" - Mursko Središće', 'Kolodvorska 32
40315 Mursko Središće', '040-543-511 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'OBZ', '"PREHRANA Društvo za ugostiteljstvo i usluge prehrane d.o.o." - Osijek', 'Zapadno predgrađe 18
31000 Osijek', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'OBZ', 'Dom za starije i nemoćne "Julije" - Osijek', 'P. Pejačevića 15
31000 Osijek', '031-369-064 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'OBZ', 'Dom za starije i nemoćne osobe "Moj dom Majdenić" - Donji Miholjac', 'Majur 8
31540 Donji Miholjac', '031-630-720 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'PSZ', '“MIMI” d.o.o. - Lipik', 'Trg kralja Tomislava 10
34551 Lipik', '034/422-178 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'PSZ', 'Dom socijalne skrbi za starije i nemoćne "Marino selo" - Poljana', 'Marino selo 41
34543 Poljana', '034/431-156 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'PSZ', 'Dom za starije i nemoćne "Anđelak" - Lipik', 'Jadranska 39
34551 Lipik', '034-422-057 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'PSZ', 'Dom za starije i nemoćne osobe "Baketarić" - Pleternica', 'Resnik 7A
34310 Pleternica', '034/268-052 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'PGZ', 'Dom za smještaj starijih i nemoćnih "Barbara Kolarek" - Malinska', 'Samoborska 3
Malinska', '051/859-295 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'PGZ', 'Dom za starije i nemoćne "Kuća Sunca" - Kornić, Krk', 'Ledine 27
51517 Kornić, Krk', '051-851-242 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'PGZ', 'Dom za starije i nemoćne "Vedri dani" - Lokve', 'Sleme bb
51316 Lokve', '051-508-088 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'PGZ', 'Dom za starije i nemoćne osobe "Nina i Zoran Buškulić" - Čavle', 'Buzdohanj 107
51219 Čavle', '051-250-287 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'PGZ', 'Dom za starije i nemoćne osobe "Villa Aurelia" - Krk', 'Skrbčići 1b
51500 Krk', '051/863-134 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'PGZ', 'Psihijatrijska bolnica "Lopača" - Lopača', 'Lopača 11
51218 Lopača', '051/230-043 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SMZ', '"Weilguni-Lepesić d.o.o." - Sisak', 'Tišina Kaptolska bb
44000 Sisak', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SMZ', 'Dom za starije i nemoćne "Zlatne godine" - Kutina', 'A.G. Matoša 44
44320 Kutina', '044-631-796 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SMZ', 'Dom za starije i nemoćne osobe "Zeleni brijeg" - Sisak', 'Nadbiskupa Posilovića 36
44000 Sisak', '044/573-335 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SDZ', '"Dom Vita D.o.o." - Strožanac Split', 'Pavićeva 12
21000 Strožanac, Split', '021/333-571 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SDZ', 'Dom socijalne skrbi “Don Drago Bosiljevac” - Supetar', 'Ul. Ive Vojnovića 14
21400 Supetar', '021/631-420 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SDZ', 'Dom za starije i nemoćne "Arkus" - Sutina Neorić', 'Sutina
21247 Neorić', '021-660-860 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SDZ', 'Dom za starije i nemoćne "Car Bonum" - Podstrana Split', 'Mutogras 16
21000 Podstrana Split', '021/330-137 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SDZ', 'Dom za starije i nemoćne osobe "Cor Meridianum" - Podstrana Split', 'Mutogras 71
21000 Podstrana Split', '021-333-026 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SDZ', 'Dom za starije i nemoćne osobe "Dom Vita" - Podstrana Split', 'Pavićeva 1
Strožanac
21000 Podstrana Split', '021-333-571 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SDZ', 'Ustanova "Tihi dom"– dom za starije i nemoćne osobe - Trogir', 'Kneza Domagoja 9/A
21220 Trogir', '021-884-271 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SDZ', 'Ustanova "Treća dob" - Okrug Gornji', 'A. Starčevića 26
21223 Okrug Gornji', '021-886-408 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'SKZ', 'Dom za starije i nemoćne "Vodice" - Vodice', 'Šime Bilan Šijca 14
22211 Vodice', '022/441-191 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'VZ', 'Caritasov dom za starije i nemoćne osobe "Sv. Ivan Krstitelj" - Ivanec', 'Kukuljevićeva 8
42240 Ivanec', '042/770-670 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'VZ', 'Dom socijalne skrbi za starije i nemoćne osobe - Varaždin', 'Zinke Kunc 47
42000 Varaždin', '042/260-444 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'VZ', 'Podružnica Pribić', 'Crkvena 21', '6270-490');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'VZ', 'Dom za starije i nemoćne osobe ''Sv. Ana''', 'Varaždinska 1
42208 Babinec', '042/725-122 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'VZ', 'Dom za starije i nemoćne osobe "Novi život"', 'Radovec, Varaždinska 4,
42208 Cestica', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'VPZ', 'Dom za starije i nemoćne "Vedrana" - Pitomača', 'M. P. Miškine 2
33405 Pitomača', '033-782-758 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'VSZ', 'Dom za starije i nemoćne osobe Ilok', 'Naselje Sofija bb
32236 Ilok', '032/592-700 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'ZDZ', 'Dom za starije i nemoćne osobe "Sveti Mihovil" - Gračac', 'Obrovačka bb
23440 Gračac', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'ZGZ', 'Dom za smještaj starijih i nemoćnih “Mala Mlaka” - Mala Mlaka - Zagreb', 'Malomlačka 136
Mala Mlaka
10 000 Zagreb', '01/6261-886; 098/253-103 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'ZGZ', 'Dom za stare i nemoćne "Sv. Kamila de Lellisa" - Vrbovec', 'Kolodvorska bb
10340 Vrbovec', '01/2793-401 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'ZGZ', 'Dom za stare i nemoćne osobe "Vrhovnik" - Dugo Selo', 'B. Huzanića 55
10370 Dugo Selo', '01/2750-506 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'ZGZ', 'Dom za starije i nemoćne "Sesvetski dom" - Sesvete', 'Brestovečka 130
10360 Sesvete', '01/2006-833 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'ZGZ', 'Dom za starije i nemoćne "Sveta Katarina" - Sesvete', 'Rugrica, Okunšćak,
Rugvička cesta 77
10360 Sesvete', '01/2760-535 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'ZGZ', 'Dom za starije i nemoćne osobe "Ljubav" - Velika Gorica', 'Mladena Kerstnera 24
10410 Velika Gorica', '01/6213-131 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '470', 'ZGZ', 'Dom za starije i nemoćne osobe "Sestre Mace" - Donja Pušča', 'Pojatno
Jurjevska 27,
10294 D. Pušća', '01/3315-651 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'BBZ', 'Dom za psihički bolesne odrasle osobe - Bjelovar', 'F. Bulića bb
43000 Bjelovar', '043/220-260 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'DNZ', 'Dom za psihički bolesne odrasle osobe - Blato', 'Ul. 32 br. 49
20271 Blato, Korčula', '020/852-648 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'GZG', 'Dom za psihički bolesne odrasle osobe - Zagreb', 'Šestinski dol 53
Zagreb', '01/3770-545 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'GZG', 'Radna jedinica Mirkovec - Začretje', '41223 Začretje', '049/227-986');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'IZ', 'Dom za psihički bolesne odrasle osobe "Sv. Nedelja” - Nedešćina', 'Nedešćina 41
52231 Nedešćina', '052/865-034 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'IZ', 'Dom za psihički bolesne odrasle osobe "Vila Maria" Pula', 'Gupčeva 2
52000 Pula', '052/389-024 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'IZ', 'Dom za psihički bolesne odrasle osobe Motovun', 'Brkač 28
52424 Motovun', '052 / 60 10 00 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'KZZ', 'Dom za psihički bolesne odrasle osobe "Bidružica" - Desinić', 'Ivanić Desinićki 30
41216 Desinić', '049/383-750 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'KZZ', 'Dom za psihički bolesne odrasle osobe "Lobor-Grad" - Lobor', 'Markušbrijeg 131
41253 Lobor', '049/430-015 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'MZ', 'Dom za psihički bolesne odrasle osobe "Orehovica" - Orehovica', 'A. Šenoe 2
40322 Orehovica', '040/635-305 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'OBZ', 'Dom za psihički bolesne odrasle osobe "Osijek" - Osijek', 'M. Divalta 2
31000 Osijek', '031/570-012 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'PSZ', 'Dom za psihički bolesne odrasle osobe "Ljeskovica" - Čaglin', 'Nova Ljeskovica 41
34350 Čaglin', '034/270-341 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'PGZ', 'Dom za psihički bolesne odrasle osobe “Turnić” - Rijeka', 'Giusseppe Carabino 6
51000 Rijeka', '051/641-210 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'PGZ', 'Podružnica "Radočaj" - Brod na Kupi', 'Brod na Kupi 27
Brod na Kupi', '051/837-365');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'SDZ', 'Dom za psihički bolesne odrasle osobe "Trogir" - Trogir', 'Tina Ujevića 21
21220 Trogir', '021/881-522 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'VZ', 'Dom za psihički bolesne odrasle osobe "Jalžabet" - Jalžabet', 'Kolodvorska 1
42203 Jalžabet', '042/215-670 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'VPZ', 'Dom za psihički bolesne odrasle osobe "Borova" - Suhopolje', 'Stjepana Radića 9A
43410 Suhopolje', '033/770-018 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'VSZ', 'Dom za psihički bolesne odrasle osobe "Nuštar" - Nuštar', 'V. Lisinskog bb
Nuštar', '032/387-040 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'ZDZ', 'Dom za psihički bolesne odrasle osobe - Zadar', 'Fra Donata Fabijanića 6
23000 Zadar', '023/2504-65 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '471', 'ZDZ', 'Dom za psihički bolesne odrasle osobe Zemunik', '23222 Zemunik donji', '023/351-700 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '474', 'KKZ', 'Dom za psihički bolesne odrasle osobe "Poljak" - Koprivnica', 'Kraljice Jelene 25
48000 Koprivnica', '048/621-142 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '474', 'KKZ', 'Dom za psihički bolesne osobe Vizjak - Koprivnica', 'Gajeva 17
48000 Koprivnica', '048/221-951 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '474', 'OBZ', 'Dom za psihički bolesne odrasle osobe - Breznica Đakovačka', 'Glavna bb, ZP 31416 Levanska varoš
Đakovačka Breznica', '031/864-356 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '474', 'VZ', 'Dom za psihički bolesne odrasle osobe Bistričak - Jalžabet', 'Varaždinska 84
Jalžabet 42403', '042/647-505 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'BBZ', 'Centar za odgoj i obrazovanje Rudolf Steiner - Daruvar', 'Masarykova 85
43500 Daruvar', '043/333-544 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'DNZ', 'Centar za rehabilitaciju Josipovac', 'Na rijeci 13a
20207 Mlini', '020/312-221 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'DNZ', 'Dom za starije i nemoćne osobe i tjelesno ili mentalno oštećene osobe - Metković', 'Ante Starčevića 25
20350 Metković', '020/696-403 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'Centar za odgoj i obrazovanje "Slava Raškaj" - Zagreb', 'Nazorova 47
10000 Zagreb', '01/4821-201 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'CZOO "Slava Raškaj" - podružnica Ilica', '', '01/3772-658');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'Centar za odgoj i obrazovanje "Vinko Bek" - Zagreb', 'Kušlanova 59a
10000 Zagreb', '01/2382-218 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'CZOO "Vinko Bek" - podružnica Nazorova', 'Nazorova 51
10000 Zagreb', '01/4821-660');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'Centar za odgoj i obrazovanje Dubrava', 'Prilaz T. Špoljara 2
10000 Zagreb', '01/2911-665 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'Centar za odgoj i obrazovanje Prekrižje - Zagreb', 'Gornje Prekrižje 48
10000 Zagreb', '01/4673-844 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'Centar za rehabilitaciju Silver', 'Stefanovec 34
10000 Zgreb', '01/2394-450 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'Centar za rehabilitaciju Zagreb', 'Orlovac 2
10000 Zagreb', '01/4673-255 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'CZR Zagreb - podružnica Sloboština', 'Sloboština bb
10000 Zagreb', '01/6640-167');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'CZR Zagreb - podružnica Paunovac', 'Paunovac 7
10000 Zagreb', '01/4834-381');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'CZR Zagreb - podružnica Ilica', 'Ilica 83
10000 Zagreb', '01/3772-530');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'GZG', 'Dom za djecu i mladež Tuškanac', 'Tuškanac 15
10000 Zagreb', '01/4834-384 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'IZ', 'Centar za rehabilitaciju Pula', 'Santoriova 11
52100 Pula', '052/543-305 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'IZ', 'CZRA - podružnica Dnevni Centar - Vodnjan', 'Fažanska Cesta 7
52215 Vodnjan', '052/543-305');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'KZ', 'Centar za rehabilitaciju Ozalj', 'Jaškovo bb
47281 Mali Erjavec', '047/751-181 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'KZ', 'CZR Ozalj - Podružnica Zorkovac', 'Trešćerovac 15
47280 Ozalj', '047/731-203');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'KZZ', 'Centar za odgoj i obrazovanje Zajezda - Budinščina', 'Zajezda 31
49284 Budinščina', '049/459-002 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'PGZ', 'Centar za rehabilitaciju Rijeka', 'Kozala 77b
51000 Rijeka', '051/506-360 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'PGZ', 'Dnevni centar za rehabilitaciju "Slava Raškaj" - Rijeka', 'Mire Radune Ban 14
51000 Rijeka', '051/677-127 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'PGZ', 'Dom za djecu i mladež - Kraljevica - Oštro', 'Šetalište Vladimira Nazora 14
51262 Kraljevica - Oštro', '051/281-313 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'SMZ', 'Centar za rehabilitaciju Komarevo', 'Komarevo gornje bb
44211 Bilinjski Kut', '044/719-114 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'SDZ', 'Centar za odgoj i obrazovanje "Juraj Bonači" - Split', 'Bruna Bušića 30
21000 Split', '021/530-663 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'SDZ', 'Centar za odgoj i obrazovanje "Slava Raškaj" - Split', 'Radnička Br.2
21000 Split', '021/541-670 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'SDZ', 'Centar za rehabilitaciju "Fra Ante Sekelez" - Vrlika', 'Ulica 30. Svibnja 16
21236 Vrlika', '021/827-048 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'SDZ', 'Centar za rehabilitaciju "Mir" - Kašetel Novi, Rudine', 'Rudine bb
21216 Kaštel Novi', '021/798-380 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'SDZ', 'Centar za rehabilitaciju Samaritanac - Split', 'Ćiril-Metodova 14a
21000 Split', '021/487-171 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'SKZ', 'Centar za odgoj i obrazovanje "Šubićevac" - Šibenik', 'Bana J. Jelačića 4
22000 Šibenik', '022/219-711 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'SKZ', 'CZOO - Podružnica Bratski Dolac', '', '022/78-015');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'VSZ', 'Centar za rehabilitaciju "Mala Terezija" - Vinkovci', 'V. Gortana 16
32 000 Vinkovci', '032/337-760 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'ZDZ', 'Centar za rehabilitaciju Sv. Filip i Jakov', 'Put Primorja 56
23207 Sveti Filip I Jakov', '023/388-622 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'ZGZ', 'Centar za odgoj i obrazovanje Lug - Bregana', 'Kneza Zdeslava 2
Lug Samoborski
10432 Bregana', '01/3375-248 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'ZGZ', 'Centar za odgoj i obrazovanje Velika Gorica', 'Zagrebačka 90
10410 Velika Gorica', '01/6221-433 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '475', 'ZGZ', 'Centar za rehabilitaciju "Stančić" - Dugo Selo', 'Zagrebačka bb
10370 Dugo Selo', '01/2757-478 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'BBZ', 'Društvo za pomoć mentalno retardiranim osobama Bjelovar', 'Gundulićeva 1,
43000 Bjelovar', '043/211-134 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'BPZ', 'Tjedni smještaj Poliklinike Zlatni cekin', 'Vinogradska bb
35000 Slavonski Brod', '035/465-408 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'DNZ', 'Centar za rehabilitaciju "Nada" - Metković', 'Športska bb
20350 Metković', '020/681-229 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'GZG', '"Nova skrb" - Zagreb', 'Šamačka 5
10 000 Zagreb', '3665-973 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'GZG', 'Dnevni centar za radnu terapiju i rehabilitaciju "Mala Kuća" - Zagreb', 'Njegoševa 3
10 000 Zagreb', '01/2302-004 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'GZG', 'Dnevni centar za rehabilitaciju i radne aktivnosti "Ozana" - Zagreb', 'Ulica Grada Vukovara 239
10 000 Zagreb', '01/6152-946 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'GZG', 'Dom za samostalno stanovanje Zagreb', 'Bleiweissova 15
10 000 Zagreb', '01/37 58 931 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'GZG', 'Specijalna bolnica za zaštitu djece s neurorazvojnim i motoričkim smetnjama - Zagreb', 'Goljak 2
10 000 Zagreb', '01/4925-200 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'GZG', 'Ustanova za rehabilitaciju hendikepiranih osoba profesionalnom rehabilitacijom i zapošljavanjem "Uriho" - Zagreb', 'Avenija Marina Držića 1
10 000 Zagreb', '01/618-4200 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'IZ', 'Centar za rehabilitaciju ''Down syndrom Pula''', 'Gajeva 14, p.p. 80
52000 Pula', '052/224-204 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'IZ', 'Dnevni centar za radnu terapiju i rehabilitaciju - Pula', 'Gajeva 3
52000 Pula', '052/505-597 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'IZ', 'Dom za djecu, mladež i odrasle osobe s cerebralnom paralizom i drugim posebnim potrebama - Pula', 'Budicinova ulica 23
52 000 Pula', '052/223-594 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'KZ', 'Centar za radnu terapiju i rehabilitaciju "Nada" - Karlovac', 'Gaza bb
47000 Karlovac', '047/613-960 (102) ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'KZZ', 'Specijalna bolnica za medicinsku rehabilitaciju - Krapinske Toplice', 'Gajeva 2
49217 Krapinske Toplice', '049/383-100 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'MZ', 'Centar za odgoj i obrazovanje Čakovec', 'Ivana pl. Zajca 26
40 000 Čakovec', '040/328-004 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'OBZ', 'Dom za samostalno stanovanje Osijek', 'Svete Ane 8
31000 Osijek', '031/37 43 99 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'PGZ', 'Centar za rehabilitaciju Fortica - Kraljevica', 'Obala kralja Tomislava 1
51262 Kraljevica', '051/283-230 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'SDZ', 'Dnevni centar za radnu terapiju i rehabilitaciju «Koračić» - Kaštel Štafilić', 'Nehajski put bb
Kaštel Štafilić,', '021/895-158 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'SKZ', 'Centar za rehabilitaciju " Roman obitelj " - Skradin', 'Ulica Dobrote
Vulinovići 52, Bratiškovci
22 222 Skradin', '022/775-568 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'SKZ', 'Udruga invalida "Sv. Bartolomej" - Knin', '4. gardijske brigade 3
22 300 Knin', '022/663-312 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'VZ', 'Centar za odgoj i obrazovanje "Tomislav Špoljar" - Varaždin', 'Graberje 33
42000 Varaždin', '042/212-787 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'VZ', 'Centar za radnu terapiju i rehabilitaciju - Varaždin', 'Zinke Kunc 47
42000 Varaždin', '042/260-444 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'VZ', 'Podružnica Pustodol - Donja Stubica', 'Toplička bb
Donja Stubica', '049/286-100');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'VZ', 'Udruga roditelja osoba s onesposobljenjima "Sunce" - Ludbreg', 'Vinogradska 1
42230 Ludbreg', '042/819-636 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'ZDZ', 'Centar za rehabilitaciju "Sunce" - Zadar', 'Vukovarska 4c
23000 Zadar', '023/326-060 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '476', 'ZGZ', 'Centar za radnu terapiju i rehabilitaciju "Sv. Vinko Paulski" - Oborovo', 'Oborovska 25
10372 Oborovo', '01/2761-343 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'BPZ', 'Dom za djecu Slavonski Brod', 'Kumičićeva 37
35000 Slavonski Brod', '035/448-690 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'DNZ', 'Dom za djecu "Maslina" - Dubrovnik', 'Vlahe Bukovca 5
20000 Dubrovnik', '020/416-704 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'GZG', 'Dom za djecu Zagreb', 'Nazorova 49
10000 Zagreb', '01/4821-702 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'GZG', 'Podružnica "Laduč"', 'Zagrebačka 106
Laduč', '01/3395-765');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'GZG', 'Podružnica "A.G. Matoš"', 'Selska cesta 132
10000 Zagreb', '01/3695-482');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'GZG', 'Podružnica "I.G. Kovačić"', 'I.G. Kovačića 23
10000 Zagreb', '01/4834-536');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'GZG', 'Podružnica "Josipovac"', 'Nazorova 49
10000 Zagreb', '01/4823-920');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'IZ', 'Dom za djecu "Pula" - Pula', 'Pino Budićin 17
52100 Pula', '052/211-192 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'KZ', 'Dom za djecu "Vladimir Nazor" - Karlovac', 'Nazorova 10
47000 Karlovac', '047/617-031 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'KKZ', 'Dom za djecu "Svitanje" - Koprivnica', 'Đure Basaričeka 13
48000 Koprivnica', '048/621-034 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'OBZ', 'Dom za djecu "Klasje" - Osijek', 'Ružina 32
31000 Osijek', '031/373-688 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'OBZ', 'Podružnica Zagrebačka', 'Zagrebačka 5
31000 Osijek', '031/208-401');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'PSZ', 'Dom za djecu "Lipik" - Lipik', 'Matije Gupca 3
34551 Lipik', '034/421-115 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'PGZ', 'Dom za djecu "Braća Mažuranići" - Novi Vinodolski', 'A. Mažuranića 5
51250 N. Vinodolski', '051/244-423 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'PGZ', 'Dom za djecu "I.Brlić Mažuranić" - Lovran', 'Omladinska 1
51415 Lovran', '051/291-521 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'PGZ', 'Podružnica Rijeka', 'Josipa Završnika 3
51000 Rijeka', '051/333-695');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'PGZ', 'Dom za djecu "Izvor" - Selce', 'E. Antića 20
51266 Selce', '051/765-095 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'SMZ', 'Dom za djecu "Vrbina" - Sisak', 'Tomislavova 16
44000 Sisak', '044/545-320 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'SDZ', 'Dom za djecu "Maestral" - Split', 'Jurja Šižgorića 4
21000 Split', '021/539-157 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'SDZ', 'Podružnica "Miljenko i Dobrila" - Kaštel Lukšić', 'Obala kralja Tomislava 36
Kaštel Lukšić', '021/227-890');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '477', 'VSZ', 'Dom za djecu "Sveta Ana" - Vinkovci', 'Anina 2d
32100 Vinkovci', '032/331-057 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '478', 'GZG', '"Nuevo Futuro" - Zagreb', 'Maksimirska 104/1
10000 Zagreb', '01/2336-101 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '478', 'GZG', 'SOS - Dječje selo Hrvatska', 'Zavrtnica 5/III,
10000 Zagreb', '01/4610-066 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '478', 'OBZ', 'SOS-dječje selo Ladimirevci', 'A.Šenoe 30
Ladimirevci
31550 Valpovo', '031/671-300 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '478', 'SMZ', 'SOS - dječje selo Lekenik', 'Ul. Hermana Gmeinera 1
44272 Lekenik', '044/772-622 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '478', 'ZGZ', 'Caritas-"Bl.Alojzije Stepinac" - Brezovica', 'Brezovička cesta 98
Brezovica', '01/6537-806 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'GZG', 'Dom za odgoj djece i mladeži Zagreb', 'Sv. Mateja 70a
10020 Zagreb', '01/6600-777 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'IZ', 'Dom za odgoj djece i mladeži Pula', 'Park R. Boškovića 6
52000 Pula', '052/218-468 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'KZ', 'Dom za odgoj djece i mladeži Karlovac', 'Banija 14
47000 Karlovac', '047/648-211 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'KZZ', 'Odgojni dom Bedekovčina', 'Aleja D. Domjanića 15
49221 Bedekovčina', '049/213-977 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'OBZ', 'Dom za odgoj djece i mladeži Osijek', 'Vinkovačka 61
31000 Osijek', '031/274-271 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'PGZ', 'Dom za odgoj djece i mladeži Rijeka', 'Vukovarska 47
51000 Rijeka', '051/671-708 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'PGZ', 'Dom za odgoj djece Cres', 'Jadranska obala 15
51557 Cres', '051/571-222 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'PGZ', 'Odgojni dom Mali Lošinj', 'Zagrebačka 16
51550 Mali Lošinj', '051/231-078 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'SDZ', 'Dom za odgoj djece i mladeži Split', 'Hercegovačka 67
21000 Split', '021/507-009 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'VZ', 'Odgojni dom Ivanec', 'Pahinsko 6
42240 Ivanec', ' ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'VZ', 'Prihvatna stanica i disciplinski centar Varaždin- CZSS Varaždin', 'J. Merlića 1a
42000 Varaždin', '042/303-900 ');
INSERT INTO Institution( type, county, name, address, phone) VALUES( '479', 'ZDZ', 'Dom za odgoj djece i mladeži Zadar', 'Bana Jelačića 8
23000 Zadar', '023/234-820 ');
|
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- 主機: 127.0.0.1
-- 產生時間: 2018 年 10 月 21 日 14:40
-- 伺服器版本: 10.1.36-MariaDB
-- PHP 版本: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- 資料庫: `chartdata`
--
-- --------------------------------------------------------
--
-- 資料表結構 `chartjs_base`
--
CREATE TABLE `chartjs_base` (
`id` int(11) NOT NULL,
`type` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
`data` varchar(300) COLLATE utf8_unicode_ci NOT NULL,
`lable` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- 資料表的匯出資料 `chartjs_base`
--
INSERT INTO `chartjs_base` (`id`, `type`, `data`, `lable`) VALUES
(1, 'LineWithLine', '0, 10, 5, 2, 20, 30, 45, 40,40,20,33,25', 'Database');
-- --------------------------------------------------------
--
-- 資料表結構 `chartjs_update`
--
CREATE TABLE `chartjs_update` (
`id` int(11) NOT NULL,
`lable` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
`value` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- 資料表的匯出資料 `chartjs_update`
--
INSERT INTO `chartjs_update` (`id`, `lable`, `value`) VALUES
(1, 'first', 10),
(2, 'second', 15),
(3, 'third', 20),
(4, 'forth', 10),
(5, 'fifth', 27),
(6, 'sixth', 30),
(7, 'seventh', 25),
(8, 'eighth', 12),
(9, 'ninth', 14),
(10, 'tenth', 25),
(11, 'eleventh', 33),
(12, 'twelfth', 44),
(13, 'thirteenth', 10),
(14, 'fourteenth', 37),
(15, 'fifteenth', 50),
(16, 'sixteenth', 30),
(17, 'seventeenth', 44),
(18, 'eighteenth', 45),
(19, 'nineteenth', 10),
(20, 'twentieth', 22),
(21, 'twenty-first', 31),
(22, 'twenty-two', 22),
(23, 'twenty-three', 42),
(24, 'twenty-four', 24),
(25, 'twenty-five', 25),
(26, 'twenty-six', 16),
(27, 'twenty-seven', 27),
(28, 'twenty-eight', 28),
(29, 'thirty', 30),
(30, 'thirty-two', 32),
(31, 'thirty-three', 33),
(32, 'thirty-four', 34),
(33, 'thirty-five', 35),
(34, 'thirty-six', 46),
(35, 'thirty-seven', 37);
--
-- 已匯出資料表的索引
--
--
-- 資料表索引 `chartjs_base`
--
ALTER TABLE `chartjs_base`
ADD PRIMARY KEY (`id`);
--
-- 資料表索引 `chartjs_update`
--
ALTER TABLE `chartjs_update`
ADD PRIMARY KEY (`id`);
--
-- 在匯出的資料表使用 AUTO_INCREMENT
--
--
-- 使用資料表 AUTO_INCREMENT `chartjs_base`
--
ALTER TABLE `chartjs_base`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- 使用資料表 AUTO_INCREMENT `chartjs_update`
--
ALTER TABLE `chartjs_update`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
@clears
@columns
col job format 99999
col log_user format a10
col priv_user format a10
col schema_user format a10
col what format a20
col interval format a20
set line 200
set pages 60
break on username skip 1
select
s.username,
jr.sid,
jr.job,
jr.failures,
jr.last_date,
jr.this_date,
dj.next_date
from dba_jobs_running jr, v$session s, dba_jobs dj
where jr.sid = s.sid
and jr.job = dj.job
order by username, job
/
|
CREATE DATABASE IF NOT EXISTS `FRDB` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `FRDB`;
-- MySQL dump 10.13 Distrib 5.6.17, for osx10.6 (i386)
--
-- Host: 127.0.0.1 Database: FRDB
-- ------------------------------------------------------
-- Server version 5.6.20
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `Certificate`
--
DROP TABLE IF EXISTS `Certificate`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Certificate` (
`certificateID` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) DEFAULT NULL,
`description` varchar(200) DEFAULT NULL,
`years` int(11) NOT NULL,
PRIMARY KEY (`certificateID`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `Certificate`
--
LOCK TABLES `Certificate` WRITE;
/*!40000 ALTER TABLE `Certificate` DISABLE KEYS */;
INSERT INTO `Certificate` VALUES (1,'Fire','Can help with fires',3),(2,'FireExpert','Can lead with fire emergencies',2),(3,'Car Crash','Can help with car crashes',4),(4,'Car Crash','Can help with car crashes',2),(5,'Fire','Can lead with fire emergencies',1),(6,'Fire Expert','Can lead with fire emergencies',5);
/*!40000 ALTER TABLE `Certificate` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-05-01 14:46:14
|
INSERT INTO solution_type(solution_type_id, description, title) VALUES (1, 'Builder', 'Builder');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (2, 'Bricklayer', 'Bricklayer');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (3, 'Carpet Fitter', 'Carpet Fitter');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (4, 'Caterer', 'Caterer');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (5, 'Chimney Sweep', 'Chimney Sweep');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (6, 'Cleaner', 'Cleaner');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (7, 'Electrician', 'Electrician');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (8, 'Gardener', 'Gardener');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (9, 'Glazier', 'Glazier');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (10, 'Joiner', 'Joiner');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (11, 'Kitchen Fitter', 'Kitchen Fitter');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (12, 'Landscape Gardener', 'Landscape Gardener');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (13, 'Locksmith', 'Locksmith');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (14, 'Painter and Decorator', 'Painter and Decorator');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (15, 'Plasterer', 'Plasterer');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (16, 'Plumber', 'Plumber');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (17, 'Printer', 'Printer');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (18, 'Roofer', 'Roofer');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (19, 'Tiler', 'Tiler');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (20, 'Tree Surgeon', 'Tree Surgeon');
INSERT INTO solution_type(solution_type_id, description, title) VALUES (21, 'Window Cleaner', 'Window Cleaner');
-- INSERT INTO solution_type(solution_type_id, description, title) VALUES (22, 'Baker', 'Baker');
-- INSERT INTO solution_type(solution_type_id, description, title) VALUES (23, 'Hairstylist', 'Hairstylist');
-- INSERT INTO solution_type(solution_type_id, description, title) VALUES (24, 'Bartender', 'Bartender');
-- INSERT INTO solution_type(solution_type_id, description, title) VALUES (25, 'Blacksmith', 'Blacksmith');
-- INSERT INTO solution_type(solution_type_id, description, title) VALUES (26, 'Pastry chef', 'Pastry chef');
-- INSERT INTO solution_type(solution_type_id, description, title) VALUES (27, 'Piano tuner', 'Piano tuner');
-- INSERT INTO solution_type(solution_type_id, description, title) VALUES (28, 'Steeplejack', 'Steeplejack');
-- INSERT INTO solution_type(solution_type_id, description, title) VALUES (29, 'Stonemason', 'Stonemason');
-- INSERT INTO solution_type(solution_type_id, description, title) VALUES (30, 'Welder', 'Welder');
/* solution_task_type */
INSERT INTO solution_task_type(solution_task_type_id, description, title, solution_type_id) VALUES (50, 'Extension', 'Extension', 1);
INSERT INTO solution_task_type(solution_task_type_id, description, title, solution_type_id) VALUES (51, 'Garage Conversion', 'Garage Conversion', 1);
INSERT INTO solution_task_type(solution_task_type_id, description, title, solution_type_id) VALUES (52, 'Plastering', 'Plastering', 1);
INSERT INTO solution_task_type(solution_task_type_id, description, title, solution_type_id) VALUES (53, 'Kitchen Fitting', 'Kitchen Fitting', 1);
INSERT INTO solution_task_type(solution_task_type_id, description, title, solution_type_id) VALUES (54, 'Bathroom Fitting', 'Bathroom Fitting', 1);
INSERT INTO solution_task_type(solution_task_type_id, description, title, solution_type_id) VALUES (55, 'Other', 'Other', 1);
INSERT INTO solution_task_type(solution_task_type_id, description, title, solution_type_id) VALUES (60, 'Garden Wall', 'Garden Wall', 2);
INSERT INTO solution_task_type(solution_task_type_id, description, title, solution_type_id) VALUES (61, 'Repair Wall', 'Repair Wall', 2);
INSERT INTO solution_task_type(solution_task_type_id, description, title, solution_type_id) VALUES (62, 'Other', 'Other', 2);
/* solution_task_job_type */
INSERT INTO solution_task_job_type(solution_task_job_type_id, description, title, solution_task_type_id) VALUES (60, 'Test', 'Test', 50);
INSERT INTO solution_task_job_type(solution_task_job_type_id, description, title, solution_task_type_id) VALUES (61, 'Test', 'Test', 50);
INSERT INTO solution_task_job_type(solution_task_job_type_id, description, title, solution_task_type_id) VALUES (62, 'Test', 'Test', 50);
INSERT INTO solution_task_job_type(solution_task_job_type_id, description, title, solution_task_type_id) VALUES (70, 'Test', 'Test', 60);
INSERT INTO solution_task_job_type(solution_task_job_type_id, description, title, solution_task_type_id) VALUES (71, 'Test', 'Test', 60);
INSERT INTO solution_task_job_type(solution_task_job_type_id, description, title, solution_task_type_id) VALUES (72, 'Test', 'Test', 60);
|
select v.sql_id,v.child_number,
v.sql_text,
v.elapsed_time,
v.cpu_time,
v.disk_reads,
rank() over(order by v.elapsed_time desc) elapsed_rank
from v$sql v
|
rem CS448 SQL Project 1
rem Said Kayyali
rem skayyali@purdue.edu
/* ######### PART 1: SQL QUERIES ######### */
rem Query1
SELECT EmpName
FROM Employee
WHERE HomeZipCode=47906 OR HomeZipCode=47907;
rem Query2
SELECT p.ProjName
FROM Project p, ProjectManager pm
WHERE p.ProjId=pm.ProjId AND EndDate IS NULL;
rem Query3
WITH Counts AS (
SELECT ProjId, COUNT(EmpId) AS COUNT FROM EmpProject GROUP BY ProjId
)
SELECT p.ProjName, c.Count
FROM Project p, Counts c
WHERE c.ProjID=p.ProjID;
rem Query4
WITH list AS (SELECT DISTINCT * FROM Graduate WHERE (Graduate.EmpId IN (SELECT DISTINCT MgrId FROM ProjectManager))),
list2 AS(SELECT UnivId, COUNT(*) AS num FROM list GROUP BY UnivId HAVING COUNT(*) = (SELECT MAX(COUNT(EmpId)) FROM list GROUP BY UnivId))
SELECT u.UnivName FROM University u, list2 l WHERE u.UnivId = l.UnivId;
rem Query5
SELECT e.EmpName, d.DeptName, g.GradYear FROM Employee e INNER JOIN Department d ON e.DeptId=d.DeptId INNER JOIN Graduate g ON e.EmpId=g.EmpId;
rem Query6
WITH list AS (SELECT DISTINCT EmpId, ProjId FROM EmpProject),
list2 AS (SELECT ProjId, COUNT(*) AS num FROM list GROUP BY ProjId HAVING COUNT(*) = (SELECT MAX(COUNT(EmpId)) FROM list GROUP BY ProjId))
SELECT p.Projname FROM Project p, list2 l WHERE p.ProjId = l.ProjId;
/* ######### END OF PART 1 ######### */
/* ######### PART 2: SQL UPDATES AND DELETES ######### */
rem Update1
UPDATE Employee SET HomeZipCode='47907' WHERE EmpId=2;
SELECT * FROM Employee WHERE EmpId=2;
rem Update2
UPDATE Graduate SET GradYear=GradYear+3 WHERE GradYear<2002;
rem Update3
UPDATE Graduate SET GradYear=GradYear-2 WHERE (EmpId IN (SELECT EmpId FROM Employee WHERE HomeZipCode='47907'));
rem Delete1
DELETE FROM ProjectManager WHERE ProjId=2;
DELETE FROM EmpProject WHERE ProjId=2;
DELETE FROM Project WHERE ProjId=2; |
-- Sequence: seq_pic
-- DROP SEQUENCE seq_pic;
CREATE SEQUENCE seq_pic
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE seq_pic
OWNER TO oecobt;
-- Table: pic
-- DROP TABLE pic;
CREATE TABLE pic
(
id integer NOT NULL DEFAULT nextval('seq_pic'::regclass),
name character varying(255),
CONSTRAINT pic_pkey PRIMARY KEY (id )
)
WITH (
OIDS=FALSE
);
ALTER TABLE pic
OWNER TO oecobt;
-- Sequence: seq_status
-- DROP SEQUENCE seq_status;
CREATE SEQUENCE seq_status
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE seq_status
OWNER TO oecobt;
-- Table: pic
-- DROP TABLE pic;
CREATE TABLE status
(
id integer NOT NULL DEFAULT nextval('seq_status'::regclass),
name character varying(255),
CONSTRAINT status_pkey PRIMARY KEY (id )
)
WITH (
OIDS=FALSE
);
ALTER TABLE status
OWNER TO oecobt;
-- Sequence: seq_severity
-- DROP SEQUENCE seq_severity;
CREATE SEQUENCE seq_severity
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE seq_severity
OWNER TO oecobt;
-- Table: severity
-- DROP TABLE severity;
CREATE TABLE severity
(
id integer NOT NULL DEFAULT nextval('seq_severity'::regclass),
name character varying(255),
CONSTRAINT severity_pkey PRIMARY KEY (id )
)
WITH (
OIDS=FALSE
);
ALTER TABLE severity
OWNER TO oecobt;
-- Sequence: seq_priority
-- DROP SEQUENCE seq_priority;
CREATE SEQUENCE seq_priority
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE seq_priority
OWNER TO oecobt;
-- Table: priority
-- DROP TABLE priority;
CREATE TABLE priority
(
id integer NOT NULL DEFAULT nextval('seq_priority'::regclass),
name character varying(255),
CONSTRAINT priority_pkey PRIMARY KEY (id )
)
WITH (
OIDS=FALSE
);
ALTER TABLE priority
OWNER TO oecobt;
-- Sequence: seq_defect
-- DROP SEQUENCE seq_defect;
CREATE SEQUENCE seq_defect
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE seq_defect
OWNER TO oecobt;
-- Table: defect
-- DROP TABLE defect;
CREATE TABLE defect
(
id integer NOT NULL DEFAULT nextval('seq_defect'::regclass),
description character varying(255),
notes character varying(255),
pic integer REFERENCES pic(id),
status integer REFERENCES status(id),
estimate double precision,
severity integer REFERENCES severity(id),
priority integer REFERENCES priority(id),
CONSTRAINT defect_pkey PRIMARY KEY (id )
)
WITH (
OIDS=FALSE
);
ALTER TABLE defect
OWNER TO oecobt;
|
SET client_encoding = 'UTF8';
CREATE TABLE shop_accounts (
id SERIAL NOT NULL,
email varchar(64) NOT NULL,
pass varchar(20) NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
updated_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
PRIMARY KEY (id)
);
INSERT INTO shop_accounts (email, pass) VALUES
('shop01@example.com', 'shop01'),
('shop02@example.com', 'shop02'),
('shop03@example.com', 'shop03')
;
CREATE TABLE shop_info (
id SERIAL NOT NULL ,
shop_accounts_id int NOT NULL,
name varchar(100) NOT NULL,
address varchar(50) NOT NULL,
prefecture varchar(50) NOT NULL,
area varchar(50) NOT NULL,
station varchar(50) NOT NULL,
tel varchar(50) NOT NULL,
opentime int NOT NULL,
closetime int NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
updated_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
FOREIGN KEY (shop_accounts_id) REFERENCES shop_accounts(id),
PRIMARY KEY (id)
);
INSERT INTO shop_info (shop_accounts_id, name, address, prefecture, area, station, tel, opentime, closetime) VALUES
(1, 'サンプル店01', '東京都新宿区歌舞伎町1-1-1', '東京都', '新宿・代々木・大久保', '新宿駅', '0120-107-929', 1100, 1700),
(2, 'サンプル店02', '東京都千代田区1-1', '東京都', '新宿・代々木・大久保', '代々木', '0120-828-828', 1100, 1400),
(3, 'サンプル店03', '東京都豊島区1-1-1', '東京都', '秋葉原・神田・水道橋', '秋葉原', '0120-370-009', 1130, 1400)
;
CREATE TABLE stations (
id SERIAL NOT NULL,
prefecture varchar(255) NOT NULL,
area varchar(255) NOT NULL,
station varchar(255) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO stations (prefecture, area, station) VALUES
('北海道', '札幌市', '札幌'),
('北海道', '札幌市', 'すすきの'),
('北海道', '旭川・富良野・士別', '旭川'),
('北海道', '旭川・富良野・士別', '士別'),
('北海道', '函館・松前・檜山', '函館'),
('北海道', '函館・松前・檜山', '松前'),
('東京都', '新宿・代々木・大久保', '新宿'),
('東京都', '新宿・代々木・大久保', '代々木'),
('東京都', '上野・浅草・日暮里', '上野'),
('東京都', '上野・浅草・日暮里', '浅草'),
('東京都', '秋葉原・神田・水道橋', '秋葉原'),
('東京都', '秋葉原・神田・水道橋', '神田')
;
CREATE TABLE times (
id SERIAL NOT NULL,
time int NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO times (time) VALUES
(1100),
(1115),
(1130),
(1145),
(1200),
(1215),
(1230),
(1245),
(1300),
(1315),
(1330),
(1345),
(1400),
(1415),
(1430),
(1445),
(1500),
(1515),
(1530),
(1545),
(1600),
(1615),
(1630),
(1645),
(1700)
;
CREATE TABLE budgets (
id SERIAL NOT NULL,
budget int NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO budgets (budget) VALUES
(500),
(1000),
(1500),
(2000),
(2500),
(3000),
(3500),
(4000),
(4500),
(5000)
;
CREATE TABLE genres (
id SERIAL NOT NULL,
genre varchar(50) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO genres (genre) VALUES
('和食'),
('洋食'),
('中華')
;
CREATE TABLE photos (
id SERIAL NOT NULL,
path varchar(100) NOT NULL,
genre varchar(50) NOT NULL,
prefecture varchar(50) NOT NULL,
area varchar(50) NOT NULL,
station varchar(50) NOT NULL,
price int NOT NULL,
menu varchar(50) NOT NULL,
opentime int NOT NULL,
closetime int NOT NULL,
shop_info_id int,
created_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
updated_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
FOREIGN KEY (shop_info_id) REFERENCES shop_info(id),
PRIMARY KEY (id)
);
INSERT INTO photos (path, genre, prefecture, area, station, price, menu, opentime, closetime, shop_info_id) VALUES
('http://localhost:4000/images/testDirectory/1.jpg', '和食', '東京都', '新宿・代々木・大久保', '新宿', 550, '鯖の味噌煮定食', 1130, 1400, 1),
('http://localhost:4000/images/testDirectory/2.jpg', '和食', '東京都', '新宿・代々木・大久保', '大久保', 1000, '寿司', 1130, 1400, 1),
('http://localhost:4000/images/testDirectory/3.jpg', '和食', '北海道', '札幌市', '札幌', 750, '豚の角煮定食', 1130, 1400, 1),
('http://localhost:4000/images/testDirectory/4.jpg', '和食', '北海道', '札幌市', '札幌', 700, '焼き魚定食', 1200, 1500, 2),
('http://localhost:4000/images/testDirectory/5.jpg', '中華', '東京都', '新宿・代々木・大久保', '大久保', 1000, '餃子定食', 1130, 1400, 2),
('http://localhost:4000/images/testDirectory/6.jpg', '洋食', '東京都', '新宿・代々木・大久保', '大久保', 1000, 'ハンバーグランチ', 1130, 1400, 3)
;
-- ('http://13.115.158.163:4000/images/testDirectory/1.jpg', '和食', '東京都', '新宿・代々木・大久保', '新宿', 550, '鯖の味噌煮定食', 1130, 1400, 1),
-- ('http://13.115.158.163:4000/images/testDirectory/2.jpg', '和食', '東京都', '新宿・代々木・大久保', '大久保', 1000, '寿司', 1130, 1400, 1),
-- ('http://13.115.158.163:4000/images/testDirectory/3.jpg', '和食', '北海道', '札幌市', '札幌', 750, '豚の角煮定食', 1130, 1400, 1),
-- ('http://13.115.158.163:4000/images/testDirectory/4.jpg', '和食', '北海道', '札幌市', '札幌', 700, '焼き魚定食', 1200, 1500, 2),
-- ('http://13.115.158.163:4000/images/testDirectory/5.jpg', '中華', '東京都', '新宿・代々木・大久保', '大久保', 1000, '餃子定食', 1130, 1400, 2),
-- ('http://13.115.158.163:4000/images/testDirectory/6.jpg', '洋食', '東京都', '新宿・代々木・大久保', '大久保', 1000, 'ハンバーグランチ', 1130, 1400, 3)
-- ; |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 21-12-2018 a las 19:47:43
-- Versión del servidor: 5.7.19
-- Versión de PHP: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de datos: `refugio`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `animal`
--
DROP TABLE IF EXISTS `animal`;
CREATE TABLE IF NOT EXISTS `animal` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nombre` varchar(50) DEFAULT NULL,
`fecha_ingreso` date DEFAULT NULL,
`peso` float NOT NULL,
`raza_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `raza_id` (`raza_id`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `animal`
--
INSERT INTO `animal` (`id`, `nombre`, `fecha_ingreso`, `peso`, `raza_id`) VALUES
(16, 'garfield', '2018-09-17', 20, 3),
(32, 'clarry', '2018-09-18', 25, 1),
(33, 'nublado', '2018-12-31', 33, 3),
(48, 'Atila', '2015-06-16', 19, 1),
(49, 'Lluvia', '2010-12-31', 40, 5),
(50, 'Alan', '2010-12-29', 65, 1);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `familia`
--
DROP TABLE IF EXISTS `familia`;
CREATE TABLE IF NOT EXISTS `familia` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nombre` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `familia`
--
INSERT INTO `familia` (`id`, `nombre`) VALUES
(1, 'perros'),
(2, 'gatos');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `raza`
--
DROP TABLE IF EXISTS `raza`;
CREATE TABLE IF NOT EXISTS `raza` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nombre` varchar(50) DEFAULT NULL,
`familia_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `familia_id` (`familia_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `raza`
--
INSERT INTO `raza` (`id`, `nombre`, `familia_id`) VALUES
(1, 'siberiano', 1),
(2, 'angora', 2),
(3, 'persa', 2),
(4, 'doberman', 1),
(5, 'chiguagua', 1),
(10, 'babuinos', 1),
(11, 'babuinos', 1);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuario`
--
DROP TABLE IF EXISTS `usuario`;
CREATE TABLE IF NOT EXISTS `usuario` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nombre_usuario` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `usuario`
--
INSERT INTO `usuario` (`id`, `nombre_usuario`, `password`) VALUES
(1, 'roberto', 'carlos');
--
-- Restricciones para tablas volcadas
--
--
-- Filtros para la tabla `animal`
--
ALTER TABLE `animal`
ADD CONSTRAINT `animal_ibfk_1` FOREIGN KEY (`raza_id`) REFERENCES `raza` (`id`);
--
-- Filtros para la tabla `raza`
--
ALTER TABLE `raza`
ADD CONSTRAINT `raza_ibfk_1` FOREIGN KEY (`familia_id`) REFERENCES `familia` (`id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 02, 2019 at 02:12 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `eventcalender`
--
-- --------------------------------------------------------
--
-- Table structure for table `buildings`
--
CREATE TABLE `buildings` (
`id` bigint(20) UNSIGNED NOT NULL,
`building_name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `buildings`
--
INSERT INTO `buildings` (`id`, `building_name`) VALUES
(1, 'Gedung 1 (edit)');
-- --------------------------------------------------------
--
-- Table structure for table `events`
--
CREATE TABLE `events` (
`id` bigint(20) UNSIGNED NOT NULL,
`ruang_id` bigint(20) UNSIGNED NOT NULL,
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`pic` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
`color` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`start_date` datetime NOT NULL,
`end_date` datetime NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `floors`
--
CREATE TABLE `floors` (
`id` bigint(20) UNSIGNED NOT NULL,
`building_id` bigint(20) UNSIGNED NOT NULL,
`floor_name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `floors`
--
INSERT INTO `floors` (`id`, `building_id`, `floor_name`) VALUES
(2, 1, 'Lantai 1');
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2019_08_11_232738_create_events_table', 1),
(5, '2019_08_13_020459_create_ruangs_table', 2);
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `ruangs`
--
CREATE TABLE `ruangs` (
`id` bigint(20) UNSIGNED NOT NULL,
`floor_id` bigint(20) UNSIGNED NOT NULL,
`ruang_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `ruangs`
--
INSERT INTO `ruangs` (`id`, `floor_id`, `ruang_name`, `created_at`, `updated_at`) VALUES
(2, 2, 'Ruang 1', '2019-09-01 19:10:08', '2019-09-01 19:10:08');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Administrator', 'admin@admin.com', NULL, '$2y$10$F2itcFmq7jH6PYD9cgGeQ.HI3U4kVNvOEmrX4bRIiFjwfup72G8nm', NULL, '2019-08-12 19:14:56', '2019-08-12 19:14:56');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `buildings`
--
ALTER TABLE `buildings`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `events`
--
ALTER TABLE `events`
ADD PRIMARY KEY (`id`),
ADD KEY `events_ibfk_1` (`ruang_id`);
--
-- Indexes for table `floors`
--
ALTER TABLE `floors`
ADD PRIMARY KEY (`id`),
ADD KEY `floors_ibfk_1` (`building_id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `ruangs`
--
ALTER TABLE `ruangs`
ADD PRIMARY KEY (`id`),
ADD KEY `ruangs_ibfk_1` (`floor_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `buildings`
--
ALTER TABLE `buildings`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `events`
--
ALTER TABLE `events`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `floors`
--
ALTER TABLE `floors`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `ruangs`
--
ALTER TABLE `ruangs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `events`
--
ALTER TABLE `events`
ADD CONSTRAINT `events_ibfk_1` FOREIGN KEY (`ruang_id`) REFERENCES `ruangs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `floors`
--
ALTER TABLE `floors`
ADD CONSTRAINT `floors_ibfk_1` FOREIGN KEY (`building_id`) REFERENCES `buildings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `ruangs`
--
ALTER TABLE `ruangs`
ADD CONSTRAINT `ruangs_ibfk_1` FOREIGN KEY (`floor_id`) REFERENCES `floors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
ALTER TABLE cadaster ALTER COLUMN floor TYPE VARCHAR(50);
|
USE RecursosHumanos
--DATA
SELECT GETDATE()
SELECT nome, DAY(dataNascto) FROM Funcionario
SELECT nome, MONTH(dataNascto) FROM Funcionario
SELECT nome, YEAR(dataNascto) FROM Funcionario
SELECT dataNascto, DATEADD(DAY, 5, dataNascto) FROM Funcionario
SELECT dataNascto, DATEADD(MONTH, 2, dataNascto) FROM Funcionario
SELECT dataNascto, DATEADD(YEAR, 3, dataNascto) FROM Funcionario
SELECT DATEDIFF(DAY, dataNascto, GETDATE()) FROM Funcionario
SELECT DATEDIFF(MONTH, dataNascto, GETDATE()) FROM Funcionario
SELECT DATEDIFF(YEAR, dataNascto, GETDATE()) FROM Funcionario
SELECT DATEDIFF(SECOND, '12-10-2000', GETDATE())
SELECT DATENAME(MONTH, dataNascto) FROM Funcionario
SELECT DATENAME(WEEKDAY, dataNascto) FROM Funcionario
--NUMERO
SELECT ABS(-10)
SELECT POWER(2,3)
SELECT SQRT(25)
SELECT ROUND(7.56,1)
SELECT LOG(4)
SELECT PI()
SELECT ROUND(LOG(SQRT(9)),3)
SELECT PI()/3
SELECT ROUND(PI(),2)
SELECT ROUND(salario,0) FROM Funcionario
--STRING
SELECT ASCII('A')
SELECT ASCII('a')
SELECT CHAR(90)
SELECT LEN('amor')0
SELECT LEFT('Prédio',3)
SELECT RIGHT('Prédio',5)
SELECT LOWER('CARRO')
SELECT UPPER('cachorro')
SELECT SUBSTRING('PANELA',2,4)
SELECT REPLACE('guarda_chuva','_','-')
SELECT LTRIM(' faca')
SELECT RTRIM('uva ') |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 29, 2021 at 03:50 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
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_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `sisfosmkmuhammadiyah`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`id_admin` int(2) NOT NULL,
`username` varchar(15) DEFAULT NULL,
`password` text DEFAULT NULL,
`nama_lengkap` text DEFAULT NULL,
`alamat` text DEFAULT NULL,
`no_telp` varchar(13) DEFAULT NULL,
`email` text DEFAULT NULL,
`blokir` enum('Ya','Tidak') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` (`id_admin`, `username`, `password`, `nama_lengkap`, `alamat`, `no_telp`, `email`, `blokir`) VALUES
(1, 'admin', '$2y$10$xEBV/x3pLGd4Aw4J/H4sn.BB8ssrN9lIEIhIwg17ihgPwncr6o5zG', 'Administrator', 'Admin Jalan Oke', '08151515', 'admin@admin.com', 'Tidak'),
(2, 'ngadiminUpdate', '$2y$10$548.W4rQrfURL9fxFDbrKumFXkOs4RuACLs0KEl1sV4KN9daWuMRG', 'Admin Website', 'Ngadimin Aja', '087184848', 'rahmat123@gmail.com', 'Tidak');
-- --------------------------------------------------------
--
-- Table structure for table `agama`
--
CREATE TABLE `agama` (
`id_agama` int(11) NOT NULL,
`keterangan` varchar(32) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `agama`
--
INSERT INTO `agama` (`id_agama`, `keterangan`) VALUES
(1, 'Katholik'),
(2, 'Kristen'),
(3, 'Budha'),
(4, 'Hindu'),
(5, 'Konghucu'),
(6, 'Islam');
-- --------------------------------------------------------
--
-- Table structure for table `analisis`
--
CREATE TABLE `analisis` (
`id_analis` int(11) NOT NULL,
`id_ujian` int(11) DEFAULT NULL,
`id_soal` int(11) DEFAULT NULL,
`id_siswa` int(11) DEFAULT NULL,
`jawaban` int(2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `analisis`
--
INSERT INTO `analisis` (`id_analis`, `id_ujian`, `id_soal`, `id_siswa`, `jawaban`) VALUES
(1, 2, 1, 1, 3),
(2, 2, 2, 1, 4),
(3, 2, 3, 1, 1);
-- --------------------------------------------------------
--
-- Table structure for table `analisis_essay`
--
CREATE TABLE `analisis_essay` (
`id_analisis_essay` int(11) NOT NULL,
`id_ujian` int(11) NOT NULL,
`id_soal_essay` int(11) NOT NULL,
`id_siswa` int(11) NOT NULL,
`jawaban` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `analisis_essay`
--
INSERT INTO `analisis_essay` (`id_analisis_essay`, `id_ujian`, `id_soal_essay`, `id_siswa`, `jawaban`) VALUES
(1, 2, 1, 1, 'oke oce sip deh');
-- --------------------------------------------------------
--
-- Table structure for table `bursa`
--
CREATE TABLE `bursa` (
`id_bursa` int(11) NOT NULL,
`keterangan` text DEFAULT NULL,
`id_bursa_pic` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `bursa`
--
INSERT INTO `bursa` (`id_bursa`, `keterangan`, `id_bursa_pic`) VALUES
(1, 'Adalah Lembaga yang menjalankan fungsi mempertemukan / memfasilitasi pertemuan antara pencari kerja dengan pengguna tenaga kerja untuk ditempatkan melalui sistem antar kerja. BKK SMK Muhammadiyah 1 Purbalingga maupun dari Lulusan dari sekolah lain untuk ditempatkan di perusahaan - perusahaan ternama.', 1);
-- --------------------------------------------------------
--
-- Table structure for table `bursa_pic`
--
CREATE TABLE `bursa_pic` (
`id_bursa_pic` int(11) NOT NULL,
`keterangan` text DEFAULT NULL,
`file` varchar(128) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `bursa_pic`
--
INSERT INTO `bursa_pic` (`id_bursa_pic`, `keterangan`, `file`) VALUES
(1, 'Seleksi Kerja 1', 'eskul-2021-03-02_20_03_03.jpg'),
(2, 'Seleksi Kerja 2', 'bursa-2021-03-02_18_03_46.jpg'),
(3, 'Pemberangkatan', 'bursa-2021-03-02_18_03_46.jpg'),
(4, 'Penempatan', 'bursa-2021-03-02_18_03_46.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `ekstrakul`
--
CREATE TABLE `ekstrakul` (
`id_eskul` int(11) NOT NULL,
`keterangan` text DEFAULT NULL,
`file` varchar(128) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `ekstrakul`
--
INSERT INTO `ekstrakul` (`id_eskul`, `keterangan`, `file`) VALUES
(1, 'Ikatan Pelajar Muhammadiyah', 'eskul-2021-03-02_18_03_08.jpg'),
(2, 'Pramuka / Hisbul Wathan', 'eskul-2021-03-02_18_03_46.jpg'),
(3, 'Palang Merah Remaja', 'eskul-2021-03-02_18_03_08.jpg'),
(4, 'Tapak Suci', 'eskul-2021-03-02_18_03_08.jpg'),
(5, 'Paskibraka', 'eskul-2021-03-02_18_03_08.jpg'),
(6, 'Desain Grafis', 'eskul-2021-03-02_18_03_08.jpg'),
(7, 'Musik', 'eskul-2021-03-02_18_03_08.jpg'),
(8, 'Tahfidzul Quran', 'eskul-2021-03-02_18_03_08.jpg'),
(9, 'English Club', 'eskul-2021-03-02_18_03_08.jpg'),
(10, 'Panahan', 'eskul-2021-03-02_18_03_08.jpg'),
(11, 'Kelas Wirausaha', 'eskul-2021-03-02_18_03_08.jpg'),
(12, 'Motorcross', 'eskul-2021-03-02_18_03_08.jpg'),
(13, 'Futsal', 'eskul-2021-03-02_18_03_08.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `file_materi`
--
CREATE TABLE `file_materi` (
`id_materi` int(7) NOT NULL,
`judul` text DEFAULT NULL,
`id_kelas` int(11) DEFAULT NULL,
`id_mata_pelajaran` int(11) DEFAULT NULL,
`nama_file` varchar(64) DEFAULT NULL,
`tgl_posting` date DEFAULT NULL,
`pembuat` int(11) DEFAULT NULL,
`hits` int(3) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `file_materi`
--
INSERT INTO `file_materi` (`id_materi`, `judul`, `id_kelas`, `id_mata_pelajaran`, `nama_file`, `tgl_posting`, `pembuat`, `hits`) VALUES
(1, 'Tutorial Virtualisasi Operating System Linux Update', 1, 1, 'document-1-2021-01-27_20_01_58.pdf', '2021-01-27', 1, 27),
(2, '2', 1, 1, 'document-1-2021-01-27_20_01_58.pdf', '2021-01-27', 1, 27),
(3, '3', 1, 1, 'document-1-2021-01-27_20_01_58.pdf', '2021-01-27', 1, 28),
(4, '4', 1, 1, 'document-1-2021-01-27_20_01_58.pdf', '2021-01-27', 1, 28),
(5, 'Tutorial Virtualisasi Operating System Linux Update', 1, 1, 'document-1-2021-01-27_20_01_58.pdf', '2021-01-27', 1, 27),
(6, 'Tutorial Virtualisasi Operating System Linux Update', 1, 1, 'document-1-2021-01-27_20_01_58.pdf', '2021-01-27', 1, 27),
(7, 'Tutorial Virtualisasi Operating System Linux Update', 1, 1, 'document-1-2021-01-27_20_01_58.pdf', '2021-01-27', 1, 27),
(8, 'Tutorial Virtualisasi Operating System Linux Update', 1, 1, 'document-1-2021-01-27_20_01_58.pdf', '2021-01-27', 1, 27),
(9, 'Tutorial Virtualisasi Operating System Linux Update', 1, 1, 'document-1-2021-01-27_20_01_58.pdf', '2021-01-27', 1, 27);
-- --------------------------------------------------------
--
-- Table structure for table `kelas`
--
CREATE TABLE `kelas` (
`id_kelas` int(11) NOT NULL,
`keterangan` varchar(3) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `kelas`
--
INSERT INTO `kelas` (`id_kelas`, `keterangan`) VALUES
(1, 'X'),
(2, 'XI'),
(3, 'XII');
-- --------------------------------------------------------
--
-- Table structure for table `kelas_detail`
--
CREATE TABLE `kelas_detail` (
`id_kelas_detail` int(11) NOT NULL,
`kelas` int(11) DEFAULT NULL,
`wali_kelas` int(11) DEFAULT NULL,
`ketua_kelas` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `kelas_detail`
--
INSERT INTO `kelas_detail` (`id_kelas_detail`, `kelas`, `wali_kelas`, `ketua_kelas`) VALUES
(3, 1, 1, 3);
-- --------------------------------------------------------
--
-- Table structure for table `kelas_tugas`
--
CREATE TABLE `kelas_tugas` (
`id_kelas_tugas` int(11) NOT NULL,
`id_topik` int(3) NOT NULL,
`id_kelas` int(11) NOT NULL,
`aktif` enum('Ya','Tidak') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `master_pelajaran`
--
CREATE TABLE `master_pelajaran` (
`id_mapel` int(11) NOT NULL,
`mapel` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `master_pelajaran`
--
INSERT INTO `master_pelajaran` (`id_mapel`, `mapel`) VALUES
(1, 'Pemrograman Dasar'),
(2, 'Sistem Operasi'),
(3, 'Bahasa Indonesia'),
(4, 'Bahasa Inggris');
-- --------------------------------------------------------
--
-- Table structure for table `mengajar`
--
CREATE TABLE `mengajar` (
`id_mengajar` int(11) NOT NULL,
`nama` varchar(25) DEFAULT NULL,
`id_pengajar` int(11) DEFAULT NULL,
`id_kelas` int(11) DEFAULT NULL,
`deskripsi` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `mengajar`
--
INSERT INTO `mengajar` (`id_mengajar`, `nama`, `id_pengajar`, `id_kelas`, `deskripsi`) VALUES
(1, '4', 1, 1, 'Mengajar Dari Jam 08.00 - 09.30');
-- --------------------------------------------------------
--
-- Table structure for table `mitrabkk`
--
CREATE TABLE `mitrabkk` (
`id_mitra` int(11) NOT NULL,
`nama_mitra` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `mitrabkk`
--
INSERT INTO `mitrabkk` (`id_mitra`, `nama_mitra`) VALUES
(1, 'PT HONDA PROSPECT MOTOR (PT. HPM)'),
(2, 'PT. ASTRA HONDA MOTOR'),
(3, 'PT. SUZUKI SMG SUNTER'),
(4, 'PT. YAMAHA INDONESIA MANUFACTURING'),
(5, 'PT. OSHUNG CIKARANG '),
(6, 'PT. LG INNOTECT'),
(7, 'PT. OPPO TANGERANG'),
(8, 'PT. PRAKASA ALAM SEGAR'),
(9, 'PT. ASABA CKRNG'),
(10, 'PT. SHOPEE SUNTER'),
(11, 'PT. VIVO TANGERANG'),
(12, 'PT. EPSON CIKARANG'),
(13, 'PT. CHEMCO');
-- --------------------------------------------------------
--
-- Table structure for table `nilai`
--
CREATE TABLE `nilai` (
`id_nilai` int(11) NOT NULL,
`id_siswa` int(11) NOT NULL,
`id_tq` int(11) NOT NULL,
`jawaban` text NOT NULL,
`sisa_waktu` time NOT NULL,
`waktu_selesai` time NOT NULL,
`jml_benar` int(5) DEFAULT NULL,
`jml_kosong` int(5) DEFAULT NULL,
`jml_salah` int(5) DEFAULT NULL,
`nilai` varchar(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `nilai`
--
INSERT INTO `nilai` (`id_nilai`, `id_siswa`, `id_tq`, `jawaban`, `sisa_waktu`, `waktu_selesai`, `jml_benar`, `jml_kosong`, `jml_salah`, `nilai`) VALUES
(1, 1, 2, '0', '00:00:00', '15:22:25', 0, 0, 3, '30'),
(2, 1, 3, '0', '00:10:00', '14:18:51', 0, 0, 0, '0');
-- --------------------------------------------------------
--
-- Table structure for table `pengajar`
--
CREATE TABLE `pengajar` (
`id_pengajar` int(3) NOT NULL,
`nip` char(12) NOT NULL,
`nama_lengkap` text NOT NULL,
`username_login` varchar(20) NOT NULL,
`password_login` text NOT NULL,
`alamat` text NOT NULL,
`tempat_lahir` varchar(25) NOT NULL,
`tgl_lahir` date NOT NULL,
`jenis_kelamin` enum('Laki - Laki','Perempuan') NOT NULL,
`agama` varchar(20) NOT NULL,
`no_telp` varchar(13) NOT NULL,
`email` text NOT NULL,
`foto` text NOT NULL,
`blokir` enum('Ya','Tidak') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `pengajar`
--
INSERT INTO `pengajar` (`id_pengajar`, `nip`, `nama_lengkap`, `username_login`, `password_login`, `alamat`, `tempat_lahir`, `tgl_lahir`, `jenis_kelamin`, `agama`, `no_telp`, `email`, `foto`, `blokir`) VALUES
(1, '121222212', 'Rudi Pengajar Update', 'pengajar', '$2y$10$1GnBVF6LY5k9eHDil0Ict.dP4rDS/dVcBAk37nCyV0/hXu3dgdrPi', 'Jl Kebayoran Baru Jakarta Selatan', 'Asahan', '1978-11-03', 'Laki - Laki', '1', '08121212121', 'rudi@gmail.com', 'Pengajar-Rudi_Pengajar_Update-2021-01-27_17_01_42.jpg', 'Tidak'),
(2, '12121212', 'Testing Guru Update', 'testing', '$2y$10$pCCInN60VaCZjLsNn3dd7ewvkkKkhl/yImDaG56Z/r0C12xSz.jly', 'Admin', 'Admin', '2021-01-26', 'Laki - Laki', '3', '081515151', 'tst@test.com', 'pengajar-Testing_Guru-2021-01-26_21_01_54.jpg', 'Tidak');
-- --------------------------------------------------------
--
-- Table structure for table `sarana_prasarana`
--
CREATE TABLE `sarana_prasarana` (
`id_prasara` int(11) NOT NULL,
`keterangan` varchar(256) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `sarana_prasarana`
--
INSERT INTO `sarana_prasarana` (`id_prasara`, `keterangan`) VALUES
(1, 'Ruang Kelas Nyaman berbasis multimedia dan LCD Proyektor'),
(2, 'Lab. Akuntansi dan Keuangan Lembaga'),
(3, 'Lab. Otomatisasi dan Tata Kelola Perkantoran'),
(4, 'Lab. Teknik Komputer dan Jaringan'),
(5, 'Lab. Fiber Optik Telkom'),
(6, 'Lab. Multimedia'),
(7, 'Lab. Bahasa'),
(8, 'Lab. Kewirausahaan'),
(9, 'Lab. Bengkel Otomotif TKRO'),
(10, 'Lab. Bengkel Otomotif TBSM'),
(11, 'Studio Musik'),
(12, 'Bursa Kerja Khusus (BKK)'),
(13, 'Fotocopy Center'),
(14, 'Mini Market One Mart'),
(15, 'Bank Surya Artha'),
(16, 'Perpustakaan'),
(17, 'Hotspot Area'),
(18, 'Lapangan Olahraga'),
(19, 'Unit Kesehatan Sekolah'),
(20, 'Test 1');
-- --------------------------------------------------------
--
-- Table structure for table `siswa`
--
CREATE TABLE `siswa` (
`id_siswa` int(9) NOT NULL,
`nis` varchar(20) DEFAULT NULL,
`nama_lengkap` text DEFAULT NULL,
`username_login` varchar(20) DEFAULT NULL,
`password_login` text DEFAULT NULL,
`id_kelas` int(11) DEFAULT NULL,
`alamat` text DEFAULT NULL,
`tempat_lahir` varchar(25) DEFAULT NULL,
`tgl_lahir` date DEFAULT NULL,
`jenis_kelamin` enum('Laki - Laki','Perempuan') DEFAULT NULL,
`agama` varchar(20) DEFAULT NULL,
`nama_ayah` text DEFAULT NULL,
`nama_ibu` text DEFAULT NULL,
`th_masuk` int(4) DEFAULT NULL,
`email` text DEFAULT NULL,
`no_telp` varchar(13) DEFAULT NULL,
`foto` text DEFAULT NULL,
`blokir` enum('Ya','Tidak') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `siswa`
--
INSERT INTO `siswa` (`id_siswa`, `nis`, `nama_lengkap`, `username_login`, `password_login`, `id_kelas`, `alamat`, `tempat_lahir`, `tgl_lahir`, `jenis_kelamin`, `agama`, `nama_ayah`, `nama_ibu`, `th_masuk`, `email`, `no_telp`, `foto`, `blokir`) VALUES
(1, '121212121', 'Rudi Siswanto', 'siswa', '$2y$10$g9Nq7ID72RSVocYK7IZzLeB379YNZD7wGi/kiUH8Fia.hDuOu905m', 1, 'Jalan Kebayoran Terlalu Lama', 'Cirebon', '2001-01-06', 'Perempuan', '2', 'Rido Suroyo', 'Suryati', 2020, 'siswan@gmail.com', '081525188', 'siswa-Siduarta-2021-01-23_19_01_00.jpg', 'Tidak'),
(2, '121212121', 'Rudi Siswanto1', 'siswa1', '$2y$10$b4Z.erGj4AQksc50vz6YROg6L3fpivli//6OyPmzFTYeKGTXWnpkW', 1, 'Jalan Kebayoran Terlalu Lama', 'Cirebon', '2001-01-06', 'Perempuan', '2', 'Rido Suroyo1', 'Suryati1', 2020, 'siswan1@gmail.com', '081525188', 'siswa-Siduarta-2021-01-23_19_01_00.jpg', 'Tidak'),
(3, '121212121', 'Rudi Siswanto2', 'siswa2', '$2y$10$b4Z.erGj4AQksc50vz6YROg6L3fpivli//6OyPmzFTYeKGTXWnpkW', 1, 'Jalan Kebayoran Terlalu Lama', 'Cirebon', '2001-01-06', 'Perempuan', '2', 'Rido Suroyo2', 'Suryati2', 2020, 'siswan2@gmail.com', '081525188', 'siswa-Siduarta-2021-01-23_19_01_00.jpg', 'Tidak'),
(4, '121212121', 'Rudi Siswanto3', 'siswa3', '$2y$10$b4Z.erGj4AQksc50vz6YROg6L3fpivli//6OyPmzFTYeKGTXWnpkW', 1, 'Jalan Kebayoran Terlalu Lama', 'Cirebon', '2001-01-06', 'Perempuan', '2', 'Rido Suroyo2', 'Suryati2', 2020, 'siswan2@gmail.com', '081525188', 'siswa-Siduarta-2021-01-23_19_01_00.jpg', 'Tidak'),
(5, '121212121', 'Rudi Siswanto4', 'siswa4', '$2y$10$b4Z.erGj4AQksc50vz6YROg6L3fpivli//6OyPmzFTYeKGTXWnpkW', 1, 'Jalan Kebayoran Terlalu Lama', 'Cirebon', '2001-01-06', 'Perempuan', '2', 'Rido Suroyo2', 'Suryati2', 2020, 'siswan2@gmail.com', '081525188', 'siswa-Siduarta-2021-01-23_19_01_00.jpg', 'Tidak'),
(6, '121212121', 'Rudi Siswanto5', 'siswa6', '$2y$10$b4Z.erGj4AQksc50vz6YROg6L3fpivli//6OyPmzFTYeKGTXWnpkW', 1, 'Jalan Kebayoran Terlalu Lama', 'Cirebon', '2001-01-06', 'Perempuan', '2', 'Rido Suroyo2', 'Suryati2', 2020, 'siswan2@gmail.com', '081525188', 'siswa-Siduarta-2021-01-23_19_01_00.jpg', 'Tidak'),
(7, '121212121', 'Rudi Siswanto6', 'siswa7', '$2y$10$b4Z.erGj4AQksc50vz6YROg6L3fpivli//6OyPmzFTYeKGTXWnpkW', 1, 'Jalan Kebayoran Terlalu Lama', 'Cirebon', '2001-01-06', 'Perempuan', '2', 'Rido Suroyo2', 'Suryati2', 2020, 'siswan2@gmail.com', '081525188', 'siswa-Siduarta-2021-01-23_19_01_00.jpg', 'Tidak'),
(8, '121212121', 'Rudi Siswanto7', 'siswa8', '$2y$10$b4Z.erGj4AQksc50vz6YROg6L3fpivli//6OyPmzFTYeKGTXWnpkW', 1, 'Jalan Kebayoran Terlalu Lama', 'Cirebon', '2001-01-06', 'Perempuan', '2', 'Rido Suroyo2', 'Suryati2', 2020, 'siswan2@gmail.com', '081525188', 'siswa-Siduarta-2021-01-23_19_01_00.jpg', 'Tidak'),
(9, '121212121', 'Rudi Siswanto8', 'siswa9', '$2y$10$b4Z.erGj4AQksc50vz6YROg6L3fpivli//6OyPmzFTYeKGTXWnpkW', 1, 'Jalan Kebayoran Terlalu Lama', 'Cirebon', '2001-01-06', 'Perempuan', '2', 'Rido Suroyo2', 'Suryati2', 2020, 'siswan2@gmail.com', '081525188', 'siswa-Siduarta-2021-01-23_19_01_00.jpg', 'Tidak'),
(10, '121222211', 'Siduarta', 'siduarta', '$2y$10$jE4ZkVkBQ5N2nX/Pied0qecznJHPQTcvCVdHnzyDSJWeUC0cVgcAS', 3, 'Jalan Sidorajo Timur Raya Nomor 21 O Kapuas Barat, Sulawesi Tenggara, Indonesia', 'Kapuas', '1984-08-16', 'Laki - Laki', '3', 'Sidoreta', 'Sidorati', 2019, 'test@test.com', '081505215', 'siswa-Siduarta-2021-01-23_19_01_00.jpg', 'Tidak');
-- --------------------------------------------------------
--
-- Table structure for table `soal`
--
CREATE TABLE `soal` (
`id_soal` int(11) NOT NULL,
`id_tq` int(3) DEFAULT NULL,
`soal` text DEFAULT NULL,
`pilihan_1` text DEFAULT NULL,
`pilihan_2` text DEFAULT NULL,
`pilihan_3` text DEFAULT NULL,
`pilihan_4` text DEFAULT NULL,
`pilihan_5` text DEFAULT NULL,
`jawaban` int(2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `soal`
--
INSERT INTO `soal` (`id_soal`, `id_tq`, `soal`, `pilihan_1`, `pilihan_2`, `pilihan_3`, `pilihan_4`, `pilihan_5`, `jawaban`) VALUES
(1, 2, 'Sebutkan OS Bukan Linux', 'Red Hat', 'SuSe', 'Mint', 'Debian', 'Mac', 5),
(2, 2, 'Siapakah Pencipta Operating Sistem Linux', 'Bill Gates', 'Steve Jobs', 'Linus Troval', 'Jack Ma', 'Elon Musk', 3),
(3, 2, 'Testing Soal 3', 'a', 'b', 'c', 'd', 'e', 2),
(6, 3, 'Test 1', 'a', 'b', 'c', 'd', 'e', 4);
-- --------------------------------------------------------
--
-- Table structure for table `soal_essay`
--
CREATE TABLE `soal_essay` (
`id_soal_essay` int(11) NOT NULL,
`id_tq` int(3) DEFAULT NULL,
`isi_soal` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `soal_essay`
--
INSERT INTO `soal_essay` (`id_soal_essay`, `id_tq`, `isi_soal`) VALUES
(1, 2, 'Jelaskan Pengeritan Dari OS'),
(2, 3, 'oke oce');
-- --------------------------------------------------------
--
-- Table structure for table `testimoni`
--
CREATE TABLE `testimoni` (
`id_testi` int(11) NOT NULL,
`id_siswa` int(11) DEFAULT NULL,
`judul` varchar(128) DEFAULT NULL,
`konten` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `testimoni`
--
INSERT INTO `testimoni` (`id_testi`, `id_siswa`, `judul`, `konten`) VALUES
(1, 1, 'Semangat', 'Oke Oce Sip GPP Gua Ganteng Kok'),
(2, 2, 'Semangat Aja Ya', 'Oke Oce Sip GPP Gua Ganteng Kok Ngikut Atas'),
(3, 1, 'SMK Oke', 'Oke Oce Deh');
-- --------------------------------------------------------
--
-- Table structure for table `topik_quiz`
--
CREATE TABLE `topik_quiz` (
`id_tq` int(3) NOT NULL,
`judul` text DEFAULT NULL,
`id_kelas` int(11) DEFAULT NULL,
`id_mata_pelajaran` int(11) DEFAULT NULL,
`tgl_buat` date DEFAULT NULL,
`pembuat` int(11) DEFAULT NULL,
`waktu_mengerjakan` time NOT NULL,
`info` text DEFAULT NULL,
`terbit` enum('Ya','Tidak') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `topik_quiz`
--
INSERT INTO `topik_quiz` (`id_tq`, `judul`, `id_kelas`, `id_mata_pelajaran`, `tgl_buat`, `pembuat`, `waktu_mengerjakan`, `info`, `terbit`) VALUES
(2, 'Virtualisasi VM Ware VSphere', 1, 2, '2021-01-29', 1, '01:15:00', 'Silahkan Di Kerjakan Boleh Melihat Google', 'Ya'),
(3, 'Merancang Bundling OS', 3, 2, '2021-01-31', 1, '00:10:00', 'Test', 'Ya');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`id_admin`);
--
-- Indexes for table `agama`
--
ALTER TABLE `agama`
ADD PRIMARY KEY (`id_agama`);
--
-- Indexes for table `analisis`
--
ALTER TABLE `analisis`
ADD PRIMARY KEY (`id_analis`);
--
-- Indexes for table `analisis_essay`
--
ALTER TABLE `analisis_essay`
ADD PRIMARY KEY (`id_analisis_essay`);
--
-- Indexes for table `bursa`
--
ALTER TABLE `bursa`
ADD PRIMARY KEY (`id_bursa`);
--
-- Indexes for table `bursa_pic`
--
ALTER TABLE `bursa_pic`
ADD PRIMARY KEY (`id_bursa_pic`);
--
-- Indexes for table `ekstrakul`
--
ALTER TABLE `ekstrakul`
ADD PRIMARY KEY (`id_eskul`);
--
-- Indexes for table `file_materi`
--
ALTER TABLE `file_materi`
ADD PRIMARY KEY (`id_materi`);
--
-- Indexes for table `kelas`
--
ALTER TABLE `kelas`
ADD PRIMARY KEY (`id_kelas`);
--
-- Indexes for table `kelas_detail`
--
ALTER TABLE `kelas_detail`
ADD PRIMARY KEY (`id_kelas_detail`);
--
-- Indexes for table `kelas_tugas`
--
ALTER TABLE `kelas_tugas`
ADD PRIMARY KEY (`id_kelas_tugas`);
--
-- Indexes for table `master_pelajaran`
--
ALTER TABLE `master_pelajaran`
ADD PRIMARY KEY (`id_mapel`);
--
-- Indexes for table `mengajar`
--
ALTER TABLE `mengajar`
ADD PRIMARY KEY (`id_mengajar`);
--
-- Indexes for table `mitrabkk`
--
ALTER TABLE `mitrabkk`
ADD PRIMARY KEY (`id_mitra`);
--
-- Indexes for table `nilai`
--
ALTER TABLE `nilai`
ADD PRIMARY KEY (`id_nilai`);
--
-- Indexes for table `pengajar`
--
ALTER TABLE `pengajar`
ADD PRIMARY KEY (`id_pengajar`);
--
-- Indexes for table `sarana_prasarana`
--
ALTER TABLE `sarana_prasarana`
ADD PRIMARY KEY (`id_prasara`);
--
-- Indexes for table `siswa`
--
ALTER TABLE `siswa`
ADD PRIMARY KEY (`id_siswa`);
--
-- Indexes for table `soal`
--
ALTER TABLE `soal`
ADD PRIMARY KEY (`id_soal`);
--
-- Indexes for table `soal_essay`
--
ALTER TABLE `soal_essay`
ADD PRIMARY KEY (`id_soal_essay`);
--
-- Indexes for table `testimoni`
--
ALTER TABLE `testimoni`
ADD PRIMARY KEY (`id_testi`);
--
-- Indexes for table `topik_quiz`
--
ALTER TABLE `topik_quiz`
ADD PRIMARY KEY (`id_tq`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
MODIFY `id_admin` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `agama`
--
ALTER TABLE `agama`
MODIFY `id_agama` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `analisis`
--
ALTER TABLE `analisis`
MODIFY `id_analis` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `analisis_essay`
--
ALTER TABLE `analisis_essay`
MODIFY `id_analisis_essay` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `bursa`
--
ALTER TABLE `bursa`
MODIFY `id_bursa` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `bursa_pic`
--
ALTER TABLE `bursa_pic`
MODIFY `id_bursa_pic` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `ekstrakul`
--
ALTER TABLE `ekstrakul`
MODIFY `id_eskul` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `file_materi`
--
ALTER TABLE `file_materi`
MODIFY `id_materi` int(7) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `kelas`
--
ALTER TABLE `kelas`
MODIFY `id_kelas` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `kelas_detail`
--
ALTER TABLE `kelas_detail`
MODIFY `id_kelas_detail` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `kelas_tugas`
--
ALTER TABLE `kelas_tugas`
MODIFY `id_kelas_tugas` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `master_pelajaran`
--
ALTER TABLE `master_pelajaran`
MODIFY `id_mapel` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `mengajar`
--
ALTER TABLE `mengajar`
MODIFY `id_mengajar` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `mitrabkk`
--
ALTER TABLE `mitrabkk`
MODIFY `id_mitra` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT for table `nilai`
--
ALTER TABLE `nilai`
MODIFY `id_nilai` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `pengajar`
--
ALTER TABLE `pengajar`
MODIFY `id_pengajar` int(3) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `sarana_prasarana`
--
ALTER TABLE `sarana_prasarana`
MODIFY `id_prasara` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `siswa`
--
ALTER TABLE `siswa`
MODIFY `id_siswa` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `soal`
--
ALTER TABLE `soal`
MODIFY `id_soal` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `soal_essay`
--
ALTER TABLE `soal_essay`
MODIFY `id_soal_essay` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `testimoni`
--
ALTER TABLE `testimoni`
MODIFY `id_testi` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `topik_quiz`
--
ALTER TABLE `topik_quiz`
MODIFY `id_tq` int(3) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
DROP TABLE IF EXISTS lookup_occ;
CREATE TABLE lookup_occ(
dob_occ text,
occ text
);
\COPY lookup_occ FROM 'data/lookup_occ.csv' DELIMITER ',' CSV HEADER;
DROP TABLE IF EXISTS lookup_ownership;
CREATE TABLE lookup_ownership (
cityowned text,
ownertype text,
nonprofit text,
ownership text
);
\COPY lookup_ownership FROM 'data/lookup_ownership.csv' DELIMITER ',' CSV HEADER;
DROP TABLE IF EXISTS _manual_corrections;
CREATE TABLE _manual_corrections (
job_number text,
field text,
old_value text,
new_value text,
reason text,
edited_date text,
editor text
);
\COPY _manual_corrections FROM 'data/manual_corrections.csv' DELIMITER ',' CSV HEADER;
DROP TABLE IF EXISTS CORR_hny_matches;
CREATE TABLE CORR_hny_matches (
hny_id text,
job_number text,
hny_project_id text,
action text
);
\COPY CORR_hny_matches FROM 'data/CORR_hny_matches.csv' DELIMITER ',' CSV HEADER;
DROP TABLE IF EXISTS housing_input_hny;
CREATE TABLE housing_input_hny (
job_number text,
hny_id text
);
\COPY housing_input_hny FROM 'data/housing_input_hny.csv' DELIMITER ',' CSV HEADER;
DROP TABLE IF EXISTS census_units10;
CREATE TABLE census_units10 (
CenBlock10 text,
CenTract10 text,
NTA10 text,
PUMA10 text,
CenUnits10 numeric
);
\COPY census_units10 FROM 'data/census_units10.csv' DELIMITER ',' CSV HEADER;
DROP TABLE IF EXISTS census_units10adj;
CREATE TABLE census_units10adj (
BCT2010 text,
CenTract10 text,
NTA10 text,
PUMA10 text,
AdjUnits10 numeric
);
\COPY census_units10adj FROM 'data/census_units10adj.csv' DELIMITER ',' CSV HEADER;
DROP TABLE IF EXISTS lookup_geo;
CREATE TABLE lookup_geo (
boro text,
borocode text,
fips_boro text,
ctcb2010 text,
ct2010 text,
bctcb2010 text,
bct2010 text,
puma text,
pumaname text,
nta text,
ntaname text,
commntydst text,
councildst text
);
\COPY lookup_geo FROM 'data/lookup_geo.csv' DELIMITER ',' CSV HEADER;
|
CREATE TABLE `user_roles`
(
`users_id` int NOT NULL,
`roles_id` int NOT NULL,
PRIMARY KEY (`users_id`, `roles_id`),
KEY `user_id` (`users_id`),
CONSTRAINT `user_role_ibfk_1`
FOREIGN KEY (`roles_id`) REFERENCES `role` (`id`),
CONSTRAINT `user_role_ibfk_2`
FOREIGN KEY (`users_id`) REFERENCES `user` (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8; |
SELECT
/* Order Information */
orders.id AS "Order ID",
clients_statement.id AS "Statement Number",
DATE_FORMAT (ordereddate,"%m/%d/%Y") as "Order Date",
order_types.`descrip` as "Product",
`propertyaddress` as "Property Address",
`propertyaddress2` as "Property Address 2",
`propertycity` AS "Property City",
`propertystate` AS "Property State",
`propertyzipcode` AS "Property Zip Code",
ROUND((((unix_timestamp(qcchecklist_complete.dts)) - (unix_timestamp(ordereddate)))/86400),2) AS "Turn Time (days)",
DATE_FORMAT (qcchecklist_complete.dts, "%m/%d/%Y") AS "Client Delivery Date",
clients.client_name AS "Client Name",
CONCAT (user_data_client.firstname," ",user_data_client.lastname) AS "Ordered By",
clients.`comp_name` AS "Company Name",
clients.`address_1` AS "Client Address 1",
clients.`address_2` AS "Client Address 2",
clients.`city` AS "Client City",
clients.state AS "Client State",
clients.`zipcode` AS "Client Zipcode",
orders.`invoiceamount` AS "Invoice Amount",
/* Agent/Inspector Information */
CASE WHEN (inspection_parts.acceptedby is Null) THEN "" ELSE inspection_parts.acceptedby END AS "Agent Vendor ID",
CASE WHEN (inspection_vendor.tax_fullname is Null) THEN "" ELSE inspection_vendor.tax_fullname END AS "Agent W9 Full Name",
CASE WHEN (inspection_vendor.tax_company is Null) THEN "" ELSE inspection_vendor.tax_company END AS "Agent W9 Company",
CASE WHEN (inspection_vendor.tax_address is Null) THEN "" ELSE inspection_vendor.tax_address END AS "Agent W9 Address",
CASE WHEN (inspection_vendor.tax_city is Null) THEN "" ELSE inspection_vendor.tax_city END AS "Agent W9 City",
CASE WHEN (inspection_vendor.tax_state is Null) THEN "" ELSE inspection_vendor.tax_state END AS "Agent W9 State",
CASE WHEN (inspection_vendor.tax_zipcode is Null) THEN "" ELSE inspection_vendor.tax_zipcode END AS "Agent W9 Zip Code",
CASE WHEN (inspection_parts.vendorfee is Null) THEN "" ELSE inspection_parts.vendorfee END AS "Agent Vendor Fee",
/* Appraiser Information */
gear_parts.acceptedby AS "Appraiser Vendor ID",
CONCAT (gear_vendor.firstname," ",gear_vendor.lastname) AS "Assigned Appraiser",
CASE WHEN (parent_vendor.userid is Null) THEN CONCAT(gear_vendor.firstname," ",gear_vendor.lastname) ELSE CONCAT(parent_vendor.firstname," ",parent_vendor.lastname) END AS 'Company Owner/Zone Licensee',
CASE WHEN (parent_vendor.userid is Null) THEN gear_vendor.tax_company ELSE parent_vendor.tax_company END AS 'W9 Appraisal Company',
CASE WHEN (parent_vendor.userid is Null) THEN gear_vendor.tax_address ELSE parent_vendor.tax_address END AS 'W9 Appraisal Company Address',
CASE WHEN (parent_vendor.userid is Null) THEN gear_vendor.tax_city ELSE parent_vendor.tax_city END AS 'A9 Appraisal Company City',
CASE WHEN (parent_vendor.userid is Null) THEN gear_vendor.tax_state ELSE parent_vendor.tax_state END AS 'W9 Appraisal Company State',
CASE WHEN (parent_vendor.userid is Null) THEN gear_vendor.tax_zipcode ELSE parent_vendor.tax_zipcode END AS 'W9 Appraisal Company Zip Code',
gear_parts.vendorfee AS 'Appraiser Vendor Fee',
/* Data Payment Column */
CASE WHEN (zreport_key > 0 AND order_types.id != 45) THEN "Yes" ELSE "" END AS "Zone Data Fee",
`gear_parts`.`gear_manual_status` AS "GEAR METHOD"
FROM
orders
INNER JOIN order_parts as gear_parts ON (orders.id=gear_parts.orderid AND gear_parts.part_type IN (12,5))
LEFT JOIN order_parts as inspection_parts ON (orders.id=inspection_parts.orderid AND inspection_parts.part_type NOT IN (12,5,9))
LEFT JOIN user_data_vendor as gear_vendor ON (gear_parts.acceptedby = gear_vendor.userid)
LEFT JOIN user_data_vendor as parent_vendor ON (gear_vendor.parent_user = parent_vendor.userid)
LEFT JOIN user_data_vendor as inspection_vendor ON (inspection_parts.acceptedby = inspection_vendor.userid)
JOIN order_types ON (orders.order_type = order_types.id)
JOIN user_data_client ON (orders.orderbyid = user_data_client.userid)
JOIN clients ON (user_data_client.clientid = clients.id)
JOIN (SELECT orderid, MIN(qcchecklist_complete.dts) as dts FROM `qcchecklist_complete` GROUP BY orderid ) AS qcchecklist_complete ON (qcchecklist_complete.orderid = orders.id)
LEFT JOIN client_transactions ON (orders.id = client_transactions.orderid AND type="COMPLETED")
LEFT JOIN `clients_statement` ON (FIND_IN_SET(client_transactions.id, transactions))
WHERE
orders.companyid= 2 AND
orders.order_type != 45 AND
orders.id IN (SELECT DISTINCT orderid FROM `qcchecklist_complete` WHERE qcchecklist_complete.`dts` >= "2015-2-01 00:00:00" AND qcchecklist_complete.`dts` <= "2015-2-28 00:00:00")
/*orders.order_status IN(10,7,14)*/
UNION
SELECT
/* Order Information */
orders.id AS "Order ID",
clients_statement.id AS "Statement Number",
DATE_FORMAT (ordereddate,"%m/%d/%Y") as "Order Date",
order_types.`descrip` as "Product",
`propertyaddress` as "Property Address",
`propertyaddress2` as "Property Address 2",
`propertycity` AS "Property City",
`propertystate` AS "Property State",
`propertyzipcode` AS "Property Zip Code",
ROUND((((unix_timestamp(qcchecklist_complete.dts)) - (unix_timestamp(ordereddate)))/86400),2) AS "Turn Time (days)",
DATE_FORMAT (qcchecklist_complete.dts, "%m/%d/%Y") AS "Client Delivery Date",
clients.client_name AS "Client Name",
CONCAT (user_data_client.firstname," ",user_data_client.lastname) AS "Ordered By",
clients.`comp_name` AS "Company Name",
clients.`address_1` AS "Client Address 1",
clients.`address_2` AS "Client Address 2",
clients.`city` AS "Client City",
clients.state AS "Client State",
clients.`zipcode` AS "Client Zipcode",
orders.`invoiceamount` AS "Invoice Amount",
/* Agent/Inspector Information */
CASE WHEN (order_parts.acceptedby is Null) THEN "" ELSE order_parts.acceptedby END AS "Agent Vendor ID",
CASE WHEN (inspection_vendor.tax_fullname is Null) THEN "" ELSE inspection_vendor.tax_fullname END AS "Agent W9 Full Name",
CASE WHEN (inspection_vendor.tax_company is Null) THEN "" ELSE inspection_vendor.tax_company END AS "Agent W9 Company",
CASE WHEN (inspection_vendor.tax_address is Null) THEN "" ELSE inspection_vendor.tax_address END AS "Agent W9 Address",
CASE WHEN (inspection_vendor.tax_city is Null) THEN "" ELSE inspection_vendor.tax_city END AS "Agent W9 City",
CASE WHEN (inspection_vendor.tax_state is Null) THEN "" ELSE inspection_vendor.tax_state END AS "Agent W9 State",
CASE WHEN (inspection_vendor.tax_zipcode is Null) THEN "" ELSE inspection_vendor.tax_zipcode END AS "Agent W9 Zip Code",
CASE WHEN (order_parts.vendorfee is Null) THEN "" ELSE order_parts.vendorfee END AS "Agent Vendor Fee",
/* Appraiser Information */
order_parts.acceptedby AS "Appraiser Vendor ID",
CONCAT (gear_vendor.firstname," ",gear_vendor.lastname) AS "Assigned Appraiser",
CASE WHEN (parent_vendor.userid is Null) THEN CONCAT(gear_vendor.firstname," ",gear_vendor.lastname) ELSE CONCAT(parent_vendor.firstname," ",parent_vendor.lastname) END AS 'Company Owner/Zone Licensee',
CASE WHEN (parent_vendor.userid is Null) THEN gear_vendor.tax_company ELSE parent_vendor.tax_company END AS 'W9 Appraisal Company',
CASE WHEN (parent_vendor.userid is Null) THEN gear_vendor.tax_address ELSE parent_vendor.tax_address END AS 'W9 Appraisal Company Address',
CASE WHEN (parent_vendor.userid is Null) THEN gear_vendor.tax_city ELSE parent_vendor.tax_city END AS 'W9 Appraisal Company City',
CASE WHEN (parent_vendor.userid is Null) THEN gear_vendor.tax_state ELSE parent_vendor.tax_state END AS 'W9 Appraisal Company State',
CASE WHEN (parent_vendor.userid is Null) THEN gear_vendor.tax_zipcode ELSE parent_vendor.tax_zipcode END AS 'W9 Appraisal Company Zip Code',
order_parts.vendorfee AS 'Appraiser Vendor Fee',
/* Data Payment Column */
CASE WHEN (zreport_key > 0 AND order_types.id != 45) THEN "Yes" ELSE "" END AS "Zone Data Fee",
" " AS "GEAR METHOD"
FROM
orders
INNER JOIN order_parts ON (orders.id=order_parts.orderid AND order_parts.part_type IN (9))
LEFT JOIN user_data_vendor as gear_vendor ON (order_parts.acceptedby = gear_vendor.userid AND gear_vendor.vendor_types=4)
LEFT JOIN user_data_vendor as parent_vendor ON (gear_vendor.parent_user = parent_vendor.userid AND gear_vendor.vendor_types=4)
LEFT JOIN user_data_vendor as inspection_vendor ON (order_parts.acceptedby = inspection_vendor.userid AND inspection_vendor.vendor_types!=4)
JOIN order_types ON (orders.order_type = order_types.id)
JOIN user_data_client ON (orders.orderbyid = user_data_client.userid)
JOIN clients ON (user_data_client.clientid = clients.id)
LEFT JOIN (SELECT orderid, MIN(qcchecklist_complete.dts) as dts FROM `qcchecklist_complete` GROUP BY orderid ) AS qcchecklist_complete ON (qcchecklist_complete.orderid = orders.id)
LEFT JOIN client_transactions ON (orders.id = client_transactions.orderid AND type="COMPLETED")
LEFT JOIN `clients_statement` ON (FIND_IN_SET(client_transactions.id, transactions))
WHERE
orders.companyid=2 AND
orders.id IN (SELECT DISTINCT orderid FROM order_parts WHERE order_parts.`effective_date` >= "2015-2-01 00:00:00" AND order_parts.`effective_date` <= "2015-2-28 00:00:00" AND part_type=9)
/*orders.order_status IN (10,7,14) */
|
--
-- Table structure for table `capability`
--
CREATE TABLE IF NOT EXISTS `av_capability` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`capability` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
-- --------------------------------------------------------
--
-- Table structure for table `emailactivations`
--
CREATE TABLE IF NOT EXISTS `av_emailactivations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL,
`activation_key` varchar(50) NOT NULL,
`type` enum('verify','passwordreset','signup') NOT NULL,
`used` tinyint(4) NOT NULL,
`created` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `group`
--
CREATE TABLE IF NOT EXISTS `av_group` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `role`
--
CREATE TABLE IF NOT EXISTS `av_role` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`owner_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `rolecapabilites`
--
CREATE TABLE IF NOT EXISTS `av_rolecapabilites` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`role_id` int(10) unsigned NOT NULL,
`capability_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `session`
--
CREATE TABLE IF NOT EXISTS `av_session` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL,
`token` varchar(64) NOT NULL,
`session` text NOT NULL,
`ip` varchar(15) NOT NULL,
`created` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `av_user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`display_name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(50) NOT NULL,
`enabled` tinyint(4) NOT NULL,
`created` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `usergroups`
--
CREATE TABLE IF NOT EXISTS `av_usergroups` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL,
`group_id` int(10) unsigned NOT NULL,
`role_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Anamakine: localhost
-- Üretim Zamanı: 11 Kas 2016, 07:15:05
-- Sunucu sürümü: 10.0.20-MariaDB
-- PHP Sürümü: 5.2.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
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_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Veritabanı: `u239346644_soh`
--
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `anket`
--
CREATE TABLE IF NOT EXISTS `anket` (
`aid` int(11) NOT NULL AUTO_INCREMENT,
`katilan` varchar(255) NOT NULL,
`deger` varchar(255) NOT NULL,
`tarih` varchar(255) NOT NULL,
PRIMARY KEY (`aid`),
UNIQUE KEY `katilan` (`katilan`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `arkadaslik`
--
CREATE TABLE IF NOT EXISTS `arkadaslik` (
`aid` int(11) NOT NULL AUTO_INCREMENT,
`istekgonderen` varchar(255) COLLATE utf8_turkish_ci NOT NULL,
`istekalan` varchar(255) COLLATE utf8_turkish_ci NOT NULL,
`onay` int(11) NOT NULL,
PRIMARY KEY (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `engellimi`
--
CREATE TABLE IF NOT EXISTS `engellimi` (
`eid` int(11) NOT NULL AUTO_INCREMENT,
`engelleyen` varchar(255) NOT NULL,
`engellenen` varchar(255) NOT NULL,
`engel` int(11) NOT NULL,
PRIMARY KEY (`eid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `mesaj_sayisi`
--
CREATE TABLE IF NOT EXISTS `mesaj_sayisi` (
`sid` int(11) NOT NULL AUTO_INCREMENT,
`mesaj_gonderen` varchar(255) NOT NULL,
`mesaj_alan` varchar(255) NOT NULL,
`mesaj_sayi` int(11) NOT NULL,
PRIMARY KEY (`sid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
--
-- Tablo döküm verisi `mesaj_sayisi`
--
INSERT INTO `mesaj_sayisi` (`sid`, `mesaj_gonderen`, `mesaj_alan`, `mesaj_sayi`) VALUES
(1, 'ilknur', 'ahmet', 0),
(2, 'ahmet', 'ilknur', 25);
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `online_mi`
--
CREATE TABLE IF NOT EXISTS `online_mi` (
`oid` int(11) NOT NULL AUTO_INCREMENT,
`oadi` varchar(255) COLLATE utf8_turkish_ci NOT NULL,
`online` varchar(11) COLLATE utf8_turkish_ci NOT NULL,
`tarih` varchar(255) COLLATE utf8_turkish_ci NOT NULL,
PRIMARY KEY (`oid`),
UNIQUE KEY `oadi` (`oadi`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `uyeler`
--
CREATE TABLE IF NOT EXISTS `uyeler` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`kadi` varchar(255) COLLATE utf8_turkish_ci NOT NULL,
`sifre` varchar(255) COLLATE utf8_turkish_ci NOT NULL,
`eposta` varchar(255) COLLATE utf8_turkish_ci NOT NULL,
`resim` varchar(255) COLLATE utf8_turkish_ci NOT NULL,
`uip` varchar(255) COLLATE utf8_turkish_ci NOT NULL,
`arkaplan` varchar(255) COLLATE utf8_turkish_ci NOT NULL,
PRIMARY KEY (`uid`),
UNIQUE KEY `kadi_2` (`kadi`),
KEY `kadi` (`kadi`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci AUTO_INCREMENT=1 ;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
select
i.id,
i.event_id,
i.dup_created_at,
i.created_at,
coalesce(i.body, ''),
i.closed_at,
i.comments,
i.locked,
i.number,
i.state,
i.title,
i.updated_at,
i.is_pull_request,
i.dup_type,
i.dup_repo_name,
coalesce(r.org_login, ''),
coalesce(r.repo_group, ''),
coalesce(r.alias, ''),
m.number,
coalesce(m.state, ''),
coalesce(m.title, ''),
coalesce(i.dupn_assignee_login, assignee.login, ''),
coalesce(assignee.name, ''),
coalesce(assignee.country_id, ''),
coalesce(assignee.sex, ''),
assignee.sex_prob,
coalesce(assignee.tz, ''),
assignee.tz_offset,
coalesce(assignee.country_name, ''),
coalesce(i.dup_actor_login, actor.login, ''),
coalesce(actor.name, ''),
coalesce(actor.country_id, ''),
coalesce(actor.sex, ''),
actor.sex_prob,
coalesce(actor.tz, ''),
actor.tz_offset,
coalesce(actor.country_name, ''),
coalesce(i.dup_user_login, usr.login, ''),
coalesce(usr.name, ''),
coalesce(usr.country_id, ''),
coalesce(usr.sex, ''),
usr.sex_prob,
coalesce(usr.tz, ''),
usr.tz_offset,
coalesce(usr.country_name, ''),
coalesce(assignee_aff.company_name, ''),
coalesce(actor_aff.company_name, ''),
coalesce(usr_aff.company_name, '')
from
gha_issues i
left join
gha_repos r
on
i.dup_repo_id = r.id
and i.dup_repo_name = r.name
left join
gha_actors assignee
on
i.assignee_id = assignee.id
left join
gha_actors actor
on
i.dup_actor_id = actor.id
left join
gha_actors usr
on
i.user_id = usr.id
left join
gha_milestones m
on
i.milestone_id = m.id
and i.event_id = m.event_id
left join
gha_actors_affiliations assignee_aff
on
i.assignee_id = assignee_aff.actor_id
and assignee_aff.dt_from <= i.dup_created_at
and assignee_aff.dt_to > i.dup_created_at
left join
gha_actors_affiliations actor_aff
on
i.dup_actor_id = actor_aff.actor_id
and actor_aff.dt_from <= i.dup_created_at
and actor_aff.dt_to > i.dup_created_at
left join
gha_actors_affiliations usr_aff
on
i.user_id = usr_aff.actor_id
and usr_aff.dt_from <= i.created_at
and usr_aff.dt_to > i.created_at
where
i.dup_created_at >= '{{from}}'
and i.dup_created_at < '{{to}}'
;
|
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Tempo de geração: 31-Out-2021 às 20:07
-- Versão do servidor: 8.0.26
-- versão do PHP: 7.3.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Banco de dados: `farmacia_painel`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `painel_pedidos`
--
CREATE TABLE `painel_pedidos` (
`id` int NOT NULL,
`produto` text NOT NULL,
`quantidade` float NOT NULL,
`ordem` text NOT NULL,
`email` text NOT NULL,
`total` float NOT NULL,
`metodo` tinyint(1) NOT NULL DEFAULT '0',
`data` datetime NOT NULL,
`pago` tinyint(1) NOT NULL DEFAULT '0',
`frete` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Extraindo dados da tabela `painel_pedidos`
--
INSERT INTO `painel_pedidos` (`id`, `produto`, `quantidade`, `ordem`, `email`, `total`, `metodo`, `data`, `pago`, `frete`) VALUES
(251, '5', 2, 'K6XSkBR7', 'cristiansilva9899@gmail.com', 25.9, 3, '2021-10-30 15:46:16', 2, 3.55),
(252, '5', 1, 'UTnp0Gjq', 'cristiansilva9899@gmail.com', 12.95, 1, '2021-10-31 19:58:55', 1, 3.55),
(253, '6', 2, 'UTnp0Gjq', 'cristiansilva9899@gmail.com', 43.9, 1, '2021-10-31 19:58:55', 1, 3.55),
(254, '6', 1, 'LSH7mWdV', 'cristiansilva9899@gmail.com', 21.95, 2, '2021-10-31 20:04:51', 0, 3.55);
-- --------------------------------------------------------
--
-- Estrutura da tabela `painel_remedios`
--
CREATE TABLE `painel_remedios` (
`id` int NOT NULL,
`nome` text NOT NULL,
`quantidade` text NOT NULL,
`laboratorio` text NOT NULL,
`valor` text NOT NULL,
`img` text NOT NULL,
`tipo` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Extraindo dados da tabela `painel_remedios`
--
INSERT INTO `painel_remedios` (`id`, `nome`, `quantidade`, `laboratorio`, `valor`, `img`, `tipo`) VALUES
(4, 'Ibuprofeno', '50mg/mL ', 'Geolab', '8.90', 'images/upload/ibuprofeno.png', 'Gotas'),
(5, 'Paracetamol', '200mg/mL ', 'Teuto', '12.95', 'images/upload/paracetamol.png', 'Gotas'),
(6, 'Dipirona Monoidratado', '500mg/mL ', 'EMS', '21.95', 'images/upload/dipirona.png', '30 Capsulas');
-- --------------------------------------------------------
--
-- Estrutura da tabela `painel_usuarios`
--
CREATE TABLE `painel_usuarios` (
`id` int NOT NULL,
`nome` text NOT NULL,
`email` text NOT NULL,
`senha` text NOT NULL,
`logradouro` text NOT NULL,
`cep` text NOT NULL,
`bairro` text NOT NULL,
`uf` text NOT NULL,
`cidade` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Extraindo dados da tabela `painel_usuarios`
--
INSERT INTO `painel_usuarios` (`id`, `nome`, `email`, `senha`, `logradouro`, `cep`, `bairro`, `uf`, `cidade`) VALUES
(15, 'usuario teste', 'demo@gmail.com', 'e10adc3949ba59abbe56e057f20f883e', 'av sapucaia,256', '00000000', 'centro', 'RS', 'Sapucaia do Sul');
--
-- Índices para tabelas despejadas
--
--
-- Índices para tabela `painel_pedidos`
--
ALTER TABLE `painel_pedidos`
ADD PRIMARY KEY (`id`);
--
-- Índices para tabela `painel_remedios`
--
ALTER TABLE `painel_remedios`
ADD PRIMARY KEY (`id`);
--
-- Índices para tabela `painel_usuarios`
--
ALTER TABLE `painel_usuarios`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT de tabelas despejadas
--
--
-- AUTO_INCREMENT de tabela `painel_pedidos`
--
ALTER TABLE `painel_pedidos`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=255;
--
-- AUTO_INCREMENT de tabela `painel_remedios`
--
ALTER TABLE `painel_remedios`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT de tabela `painel_usuarios`
--
ALTER TABLE `painel_usuarios`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
CREATE DATABASE IF NOT EXISTS `pedromazine` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `pedromazine`;
-- MySQL dump 10.13 Distrib 5.6.17, for Win64 (x86_64)
--
-- Host: mysql.pedromazine.com.br Database: pedromazine
-- ------------------------------------------------------
-- Server version 5.5.43-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `ro_newsletters`
--
DROP TABLE IF EXISTS `ro_newsletters`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ro_newsletters` (
`newsletters_id` int(11) NOT NULL AUTO_INCREMENT,
`newsletters_name` varchar(60) NOT NULL,
`newsletters_email` varchar(220) NOT NULL,
`newsletters_added` date NOT NULL,
`newsletters_last_mod` date NOT NULL,
PRIMARY KEY (`newsletters_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ro_newsletters`
--
LOCK TABLES `ro_newsletters` WRITE;
/*!40000 ALTER TABLE `ro_newsletters` DISABLE KEYS */;
INSERT INTO `ro_newsletters` VALUES (1,'Eliane Godoy','rioclaro@mastermind.com.br','2013-12-09','2013-12-09'),(2,'Jonas Callegari','jonas@pandapix.com.br','2013-12-10','2013-12-10'),(3,'alexandra','xandrapena@hotmail.com','2014-04-15','2014-04-15'),(4,'-1\\\'','1','2014-08-13','2014-08-13'),(5,'1','-1\\\'','2014-08-13','2014-08-13'),(6,'simone Anacleto','mamitinho.simone@gmail.com','2014-09-19','2014-09-19'),(7,'Yngrid','yncamargo@hotmail.com','2014-09-30','2014-09-30'),(8,'Luís Alberto Brigatto','betobrigatto@yahoo.com.br','2014-11-14','2014-11-14'),(9,'ELIANA','elianaspatti@yahoo.com.br','2015-02-11','2015-02-11'),(10,'SP','naoresponda@maladireta.inf','2015-06-28','2015-06-28'),(11,'Denise T T Jorge','denise.jorge@jbsconstrutora.com.br','2015-09-23','2015-09-23'),(12,'Telanimada ','contato@telanimada.com.br','2015-09-25','2015-09-25'),(13,'SP','naoresponda@maladireta.inf','2015-09-26','2015-09-26'),(14,'Kevin Pedro','kevin-sp@outlook.com','2015-10-21','2015-10-21'),(15,'Ricardo G. Fonseca','ricardofonseca@mastermindcampinas.com.br','2015-11-05','2015-11-05'),(16,'Pedro Mazine','contato@pedromazine.com.br','2015-11-12','2015-11-12');
/*!40000 ALTER TABLE `ro_newsletters` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2015-12-14 9:31:07
|
select key,
avg(value::float),
max(value::float),
min(value::float)
from results r, surveys s
where s.master_id = %{master_id}
and r.survey_id = s.id
and s.valid_survey = true
and s.complete = true
group by key
|
-- INSERT INTO barangays VALUES ('1', '012801001', 'Adams (Pob.)', '01', '0128', '012801',now(),now());
-- id, users_id, seasons_id, planned_hec, actual_hec, plannumfar, actnumfar, plqty, actqty,season_list_statuses_id
-- season 1 dry
INSERT INTO `season_lists` VALUES(1,'10','1','4.0','3.5','13','12','100','100','2',now(),now());
INSERT INTO `season_lists` VALUES(2,'11','1','4.8','4.8','15','14','100','100','2',now(),now()); -- Gregorio
INSERT INTO `season_lists` VALUES(3,'12','1','16.3','12.1','7','5','320','310','2',now(),now());
-- season 2 dry
INSERT INTO `season_lists` VALUES(4,'10','2','3.8','3.2','12','11','150','145','2',now(),now());
INSERT INTO `season_lists` VALUES(5,'11','2','4.1','7.0','6','6','120','115','2',now(),now()); -- Gregorio
INSERT INTO `season_lists` VALUES(6,'12','2','14.2','12','20','19','340','320','2',now(),now());
-- season 3 wet
INSERT INTO `season_lists` VALUES(7,'10','3','2.5','2.2','10','12','115','107','2',now(),now());
INSERT INTO `season_lists` VALUES(8,'11','3','7.8','8.1','10','9','105','98','2',now(),now()); -- Gregorio
INSERT INTO `season_lists` VALUES(9,'12','3','12','14','13','17','270','258','2',now(),now());
-- season 4 wet
INSERT INTO `season_lists` VALUES(10,'10','4','2.2','1.3','11','10','90','85','2',now(),now());
INSERT INTO `season_lists` VALUES(11,'11','4','7.8','7.4','9','9','100','94','2',now(),now()); -- Gregorio
INSERT INTO `season_lists` VALUES(12,'12','4','19','8.5','19','18','240','220','2',now(),now());
-- season 5 dry
INSERT INTO `season_lists` VALUES(13,'10','5','3.9','3.7','12','12','130','125','2',now(),now());
INSERT INTO `season_lists` VALUES(14,'11','5','8.9','8.5','15','13','120','110','2',now(),now()); -- Gregorio
INSERT INTO `season_lists` VALUES(15,'12','5','12','11','23','20','350','320','2',now(),now());
-- Julio farmer
INSERT INTO `season_lists` VALUES(16,'17','1','3.0','2.0','13','11','150','145','2',now(),now());
INSERT INTO `season_lists` VALUES(17,'17','2','3.7','3.5','11','10','120','110','2',now(),now());
INSERT INTO `season_lists` VALUES(18,'17','3','3.6','3.5','10','9','100','88','2',now(),now());
INSERT INTO `season_lists` VALUES(19,'17','4','3.2','3.0','9','8','80','70','2',now(),now());
INSERT INTO `season_lists` VALUES(20,'17','5','3.9','3.4','12','11','135','124','2',now(),now());
-- Margarita farmer
INSERT INTO `season_lists` VALUES(21,'18','1','2.0','2.0','11','10','80','80','2',now(),now());
INSERT INTO `season_lists` VALUES(22,'18','2','1.7','1.5','10','10','94','90','2',now(),now());
INSERT INTO `season_lists` VALUES(23,'18','3','1.6','1.5','8','8','87','83','2',now(),now());
INSERT INTO `season_lists` VALUES(24,'18','4','1.2','1.0','9','8','80','79','2',now(),now());
INSERT INTO `season_lists` VALUES(25,'18','5','1.9','1.4','12','11','95','93','2',now(),now());
-- Ines farmer
INSERT INTO `season_lists` VALUES(26,'19','1','4.0','3.7','13','11','180','175','2',now(),now());
INSERT INTO `season_lists` VALUES(27,'19','2','4.3','3.8','11','10','173','165','2',now(),now());
INSERT INTO `season_lists` VALUES(28,'19','3','3.5','3.5','10','9','120','110','2',now(),now());
INSERT INTO `season_lists` VALUES(29,'19','4','3.2','6.0','11','11','110','105','2',now(),now());
INSERT INTO `season_lists` VALUES(30,'19','5','4.5','7.4','12','11','170','164','2',now(),now());
--season 6 wet
-- INSERT INTO `season_lists` VALUES(16,'12','6','9.1',null,'10',null,'110',null,'1',now(),now());
-- INSERT INTO `season_lists` VALUES(17,'12','6','8.9',null,'12',null,'105',null,'1',now(),now());
-- INSERT INTO `season_lists` VALUES(18,'12','6','18',null,'18',null,'270',null,'1',now(),now());
|
-- Do not perform any anonymisation steps
SELECT NOW();
|
show databases;
create database springsecuritydb;
CREATE TABLE IF NOT EXISTS `springsecuritydb`.`user` (
`id` INT NOT NULL AUTO_INCREMENT,
`active` TINYINT NULL,
`password` VARCHAR(45) NULL,
`roles` VARCHAR(45) NULL,
`user_name` VARCHAR(45) NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
insert into (id,active,password,roles,user_name)values(1,1,'pass',"ROLE_USER",'user'); |
use SalesDb
select * from customers;
select city,state, sum(sales) 'sum' from customers
group by City, state
having city in ('Cincinnati' , 'Columbus');
select city, sum(sales) from Customers
group by city
having sum(sales) > 600000
select Name 'customer' from customers
where sales < 10000
select Name, Sales, (City + ',' + state) 'City, State' from Customers
where sales >= 30000 and sales < 40000 |
/*
619. Biggest Single Number
https://www.leetfree.com/problems/biggest-single-number.html
Table number contains many numbers in column num including duplicated ones.
Can you write a SQL query to find the biggest number, which only appears once.
+---+
|num|
+---+
| 8 |
| 8 |
| 3 |
| 3 |
| 1 |
| 4 |
| 5 |
| 6 |
For the sample data above, your query should return the following result:
+---+
|num|
+---+
| 6 |
Note:
If there is no such number, just output null.
*/
# return all num which only appears once
select num
from number
group by num
having count(num) = 1;
# return the maximum one from above table
select max(num) as num
from (
select num from number group by num having count(num) = 1
) as table
; |
-- MySQL DB
--
CREATE DATABASE IF NOT EXISTS cmdb DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
USE cmdb;
CREATE TABLE users (
userid int unsigned NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
age int unsigned DEFAULT NULL,
class varchar(255) DEFAULT NULL,
phone varchar(16) DEFAULT NULL,
address varchar(255) DEFAULT NULL,
password varchar(255) NOT NULL,
PRIMARY KEY(userid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO users VALUES(1, "peter", 25, "reboot", "15555555555", "chaoyang", "5f4dcc3b5aa765d61d8327deb882cf99");
|
EXEC ('ALTER TABLE DB_PROFILE_DATA2.dbo.TB_CARGO NOCHECK CONSTRAINT ALL');
EXEC ('ALTER TABLE DB_PROFILE_DATA2.dbo.TB_FUNCIONARIO NOCHECK CONSTRAINT ALL');
--EXEC ('ALTER TABLE DB_PROFILE_DATA2.dbo.TB_PROCESSO NOCHECK CONSTRAINT ALL');
EXEC ('ALTER TABLE DB_PROFILE_DATA2.dbo.TB_CARGO DISABLE TRIGGER ALL');
EXEC ('DELETE FROM DB_PROFILE_DATA2.dbo.TB_CARGO ');
EXEC ('ALTER TABLE DB_PROFILE_DATA2.dbo.TB_CARGO CHECK CONSTRAINT ALL ');
EXEC ('ALTER TABLE DB_PROFILE_DATA2.dbo.TB_CARGO ENABLE TRIGGER ALL');
--EXEC ('SELECT * FROM DB_PROFILE_DATA2.dbo.TB_CARGO');
EXEC ('select COUNT (*) from DB_PROFILE_DATA2.dbo.TB_CARGO');
|
DROP TABLE IF EXISTS `eportfolio`.`users`;
CREATE TABLE `eportfolio`.`users`
(
`MatNr` INT NOT NULL ,
`name` VARCHAR(255) NOT NULL ,
`email` VARCHAR(255) NOT NULL ,
PRIMARY KEY (`MatNr`)
) ENGINE = InnoDB;
INSERT INTO USERS (MatNr, name, email) VALUES ('55984957', 'XVCAOCXF URBMFD', 'URBMFD.XVCAOCXF@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('51797157', 'OEIZZWQJ PRYNZK', 'PRYNZK.OEIZZWQJ@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('77631412', 'KMLDMDHU PZCGYB', 'PZCGYB.KMLDMDHU@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('11521975', 'ZRDZRKAM LFMBIM', 'LFMBIM.ZRDZRKAM@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('84645818', 'MBZGCUHP DICPSE', 'DICPSE.MBZGCUHP@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('93875823', 'FLNHDZYK PDXIWA', 'PDXIWA.FLNHDZYK@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('58856912', 'YLLDEWCF WUGPRF', 'WUGPRF.YLLDEWCF@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('43872894', 'SGITTZNU VGMEOL', 'VGMEOL.SGITTZNU@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('16897398', 'SQKTBUCL KUZFPK', 'KUZFPK.SQKTBUCL@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('45654184', 'SXIJFUKM SPAJAL', 'SPAJAL.SXIJFUKM@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('43139527', 'TCEIMOHH JEEDLY', 'JEEDLY.TCEIMOHH@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('93925553', 'DOZCCIUE NODQQF', 'NODQQF.DOZCCIUE@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('28335991', 'CFRDJSHA HNBKHO', 'HNBKHO.CFRDJSHA@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('36934638', 'RWWWXWLB XEUNFX', 'XEUNFX.RWWWXWLB@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('33471976', 'WLGGMPXQ UDVGSK', 'UDVGSK.WLGGMPXQ@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('22914817', 'PSSERRGN UNYJOD', 'UNYJOD.PSSERRGN@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('37552668', 'PDCUEMNP GZFTWI', 'GZFTWI.PDCUEMNP@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('98447982', 'QWUVBHAI CIIZIM', 'CIIZIM.QWUVBHAI@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('69397512', 'PBDLAKQK BYFUEJ', 'BYFUEJ.PBDLAKQK@dhbw-karlsruhe.de');
INSERT INTO USERS (MatNr, name, email) VALUES ('83134483', 'UCBGJZGD AHPZSL', 'AHPZSL.UCBGJZGD@dhbw-karlsruhe.de');
DROP TABLE IF EXISTS `eportfolio`.`Courses`;
CREATE TABLE `eportfolio`.`Courses`
(
`CoursNr` INT NOT NULL ,
`name` VARCHAR(255) NOT NULL,
`room` VARCHAR(255) NOT NULL,
PRIMARY KEY(`CoursNr`)
) ENGINE = InnoDB;
INSERT INTO Courses (CoursNr, name, room) VALUES ('1', 'Software Engineering', 'D209');
INSERT INTO Courses (CoursNr, name, room) VALUES ('2', 'Datenbanken', 'A213');
INSERT INTO Courses (CoursNr, name, room) VALUES ('3', 'Technische Informatik', 'E432');
INSERT INTO Courses (CoursNr, name, room) VALUES ('4', 'Rechnerarchitektur', 'C123');
INSERT INTO Courses (CoursNr, name, room) VALUES ('5', 'Programmieren', 'F128');
INSERT INTO Courses (CoursNr, name, room) VALUES ('6', 'Formale Sprachen', 'D209');
INSERT INTO Courses (CoursNr, name, room) VALUES ('7', 'Theoretische Informatik', 'B333');
INSERT INTO Courses (CoursNr, name, room) VALUES ('8', 'Höhere Mathematik', 'D208');
INSERT INTO Courses (CoursNr, name, room) VALUES ('9', 'Compilerbau', 'D209');
INSERT INTO Courses (CoursNr, name, room) VALUES ('10', 'Betriebswirtschaftslehre', 'D209');
DROP TABLE IF EXISTS `eportfolio`.`MatCours`;
CREATE TABLE `eportfolio`.`MatCours`
(
`MatNr` INT NOT NULL ,
`CoursNr` INT NOT NULL,
PRIMARY KEY(`MatNr`,`CoursNr`)
) ENGINE = InnoDB;
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('11521975', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('16897398', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('22914817', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('28335991', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('33471976', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('36934638', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('37552668', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('43139527', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('43872894', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('45654184', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('51797157', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('55984957', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('58856912', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('69397512', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('77631412', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('83134483', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('84645818', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('93875823', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('93925553', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('98447982', '1');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('11521975', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('16897398', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('22914817', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('28335991', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('33471976', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('36934638', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('37552668', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('43139527', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('43872894', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('45654184', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('51797157', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('55984957', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('58856912', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('69397512', '2');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('11521975', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('16897398', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('22914817', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('28335991', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('33471976', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('36934638', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('37552668', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('43139527', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('69397512', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('77631412', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('83134483', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('84645818', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('93875823', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('93925553', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('98447982', '3');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('43872894', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('45654184', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('51797157', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('55984957', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('58856912', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('69397512', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('77631412', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('83134483', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('84645818', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('93875823', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('93925553', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('98447982', '4');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('28335991', '5');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('33471976', '5');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('36934638', '5');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('37552668', '5');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('43139527', '5');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('55984957', '5');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('58856912', '5');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('84645818', '5');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('98447982', '5');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('28335991', '6');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('43139527', '6');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('55984957', '6');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('58856912', '6');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('84645818', '6');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('93875823', '6');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('98447982', '6');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('11521975', '7');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('16897398', '7');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('22914817', '7');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('28335991', '7');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('93925553', '7');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('98447982', '7');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('33471976', '8');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('36934638', '8');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('37552668', '8');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('51797157', '8');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('55984957', '8');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('93925553', '8');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('98447982', '8');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('11521975', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('33471976', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('36934638', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('37552668', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('43139527', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('43872894', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('55984957', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('58856912', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('69397512', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('83134483', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('84645818', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('93925553', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('98447982', '9');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('11521975', '10');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('16897398', '10');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('22914817', '10');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('28335991', '10');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('33471976', '10');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('36934638', '10');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('37552668', '10');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('43872894', '10');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('45654184', '10');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('51797157', '10');
INSERT INTO MatCours (MatNr, CoursNr) VALUES ('93875823', '10');
|
use msg_training;
insert into users values (1, 0, 'marius_pop@msggroup.com', 'Marius', 'Pop', '+40746532213', '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', 'popm', false);
insert into users values (2, 0, 'ioana_dumitrescu@msggroup.com', 'Ioana', 'Dumitrescu', '+40746532325', '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', 'dumiti', false);
insert into users values (3, 0, 'veronica_bogza@msggroup.com', 'Veronica', 'Bogza', '+40746532448', '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', 'bogzav', false);
insert into users values (4, 0, 'iulian_oprea@msggroup.com', 'Iulian', 'Oprea', '+40746532287', '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', 'opreai', false);
insert into users values (5, 0, 'tudor_nedelcu@msggroup.com', 'Tudor', 'Nedelcu', '+40746532921', '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', 'nedelt', false);
insert into bugs values(1,'BugOne', 'Praesent porta volutpat felis non mollis. Nullam quis eleifend sem. Praesent hendrerit ut lorem ut gravida. Suspendisse ut laoreet lacus, ut pharetra turpis. Curabitur pretium dolor ut congue mattis. Quisque semper velit vel tortor porta, et volutpat ante tincidunt. Aenean porttitor tincidunt lorem, eget faucibus tellus luctus eget.', '1.0', '2019-01-09 01:10:20', 'NEW', '1.0','CRITICAL', 'popm', 'nedelt');
insert into bugs values(2,'BugTwo', 'Praesent porta volutpat felis non mollis. Nullam quis eleifend sem. Praesent hendrerit ut lorem ut gravida. Suspendisse ut laoreet lacus, ut pharetra turpis. Curabitur pretium dolor ut congue mattis. Quisque semper velit vel tortor porta, et volutpat ante tincidunt. Aenean porttitor tincidunt lorem, eget faucibus tellus luctus eget.', '3.0', '2018-10-12 02:10:20', 'FIXED', '2.8','MEDIUM', 'popm', 'dumiti');
insert into bugs values(3,'BugThree', 'Praesent porta volutpat felis non mollis. Nullam quis eleifend sem. Praesent hendrerit ut lorem ut gravida. Suspendisse ut laoreet lacus, ut pharetra turpis. Curabitur pretium dolor ut congue mattis. Quisque semper velit vel tortor porta, et volutpat ante tincidunt. Aenean porttitor tincidunt lorem, eget faucibus tellus luctus eget.', '1.1', '2018-01-07 03:10:20', 'REJECTED', '1.1','LOW', 'bogzav', 'dumiti');
insert into bugs values(4,'BugFour', 'Praesent porta volutpat felis non mollis. Nullam quis eleifend sem. Praesent hendrerit ut lorem ut gravida. Suspendisse ut laoreet lacus, ut pharetra turpis. Curabitur pretium dolor ut congue mattis. Quisque semper velit vel tortor porta, et volutpat ante tincidunt. Aenean porttitor tincidunt lorem, eget faucibus tellus luctus eget.', '1.9', '2018-09-06 04:10:20', 'INFO_NEEDED', '1.1','MEDIUM', 'popm', 'popm');
insert into bugs values(5,'BugFive', 'Praesent porta volutpat felis non mollis. Nullam quis eleifend sem. Praesent hendrerit ut lorem ut gravida. Suspendisse ut laoreet lacus, ut pharetra turpis. Curabitur pretium dolor ut congue mattis. Quisque semper velit vel tortor porta, et volutpat ante tincidunt. Aenean porttitor tincidunt lorem, eget faucibus tellus luctus eget.a', '1.2', '2019-07-05 05:10:20', 'IN_PROGRESS', '1.2','HIGH', 'opreai', 'dumiti');
insert into bugs values(6,'BugSix', 'Praesent porta volutpat felis non mollis. Nullam quis eleifend sem. Praesent hendrerit ut lorem ut gravida. Suspendisse ut laoreet lacus, ut pharetra turpis. Curabitur pretium dolor ut congue mattis. Quisque semper velit vel tortor porta, et volutpat ante tincidunt. Aenean porttitor tincidunt lorem, eget faucibus tellus luctus eget.', '2.0', '2019-04-04 06:10:20', 'IN_PROGRESS', '2.0','CRITICAL', 'nedelt', 'dumiti');
insert into bugs values(7,'BugSeven', 'Praesent porta volutpat felis non mollis. Nullam quis eleifend sem. Praesent hendrerit ut lorem ut gravida. Suspendisse ut laoreet lacus, ut pharetra turpis. Curabitur pretium dolor ut congue mattis. Quisque semper velit vel tortor porta, et volutpat ante tincidunt. Aenean porttitor tincidunt lorem, eget faucibus tellus luctus eget.', '4.0', '2019-04-01 07:10:20', 'INFO_NEEDED', '1.1','HIGH', 'popm', 'bogzav');
insert into bugs values(8,'BugEight', 'Praesent porta volutpat felis non mollis. Nullam quis eleifend sem. Praesent hendrerit ut lorem ut gravida. Suspendisse ut laoreet lacus, ut pharetra turpis. Curabitur pretium dolor ut congue mattis. Quisque semper velit vel tortor porta, et volutpat ante tincidunt. Aenean porttitor tincidunt lorem, eget faucibus tellus luctus eget.', '5.0', '2017-11-02 08:10:20', 'CLOSED', '4.9','LOW', 'dumiti', 'popm');
insert into bugs values(9,'BugNine', 'Praesent porta volutpat felis non mollis. Nullam quis eleifend sem. Praesent hendrerit ut lorem ut gravida. Suspendisse ut laoreet lacus, ut pharetra turpis. Curabitur pretium dolor ut congue mattis. Quisque semper velit vel tortor porta, et volutpat ante tincidunt. Aenean porttitor tincidunt lorem, eget faucibus tellus luctus eget.', '3.2', '2018-10-02 08:10:20', 'REJECTED', '3.1','LOW', 'dumiti', 'opreai');
insert into comments value('Random comment.', '2018-10-09 01:10:20', 1, 1, 3);
insert into comments value('Random comment.', '2019-02-10 02:11:20', 2, 2, 1);
insert into comments value('Random comment.', '2018-12-11 03:12:20', 3, 3, 2);
insert into comments value('Random comment.', '2019-07-12 04:13:20', 4, 4, 6);
insert into comments value('Random comment.', '2018-05-13 05:14:20', 5, 5, 8);
insert into permissions values
(1,'See, add, edit and delete users.','USER_MANAGEMENT'),
(2,'See, add, edit and delete bugs.','BUG_MANAGEMENT'),
(3,'Close a bug','BUG_CLOSE'),
(4,'Change role permissions.','PERMISSION_MANAGEMENT'),
(5,'Export bug pdf.','BUG_EXPORT_PDF');
insert into roles values
(1,'ADM'),
(2,'PM'),
(3,'TM'),
(4,'DEV'),
(5,'TEST');
insert into roles_permissions values
(1,1),
(1,2),
(1,3),
(1,4),
(1,5),
(2,1),
(2,4),
(3,2),
(3,3),
(3,5),
(4,1),
(4,2),
(4,4);
insert into users_roles values
(1,1),
(2,2),
(3,3),
(4,4),
(5,5);
insert into notifications values(1, '2019-08-12 01:10:20', 'welcome user', 'WELCOME_NEW_USER', '', 1);
insert into notifications values(2, '2019-08-12 01:10:20', 'welcome user', 'WELCOME_NEW_USER', '', 2);
insert into notifications values(3, '2019-08-12 01:10:20', 'welcome user', 'WELCOME_NEW_USER', '', 3);
insert into notifications values(4, '2019-08-12 01:10:20', 'welcome user', 'WELCOME_NEW_USER', '', 4);
insert into notifications values(5, '2019-08-12 01:10:20', 'welcome user', 'WELCOME_NEW_USER', '', 5);
insert into notifications values(6, '2019-08-12 01:10:20', 'updated bug', 'BUG_UPDATED', 'http://localhost:4200/dashboard/bugs?bugId=1', 1);
insert into notifications values(7, '2001-09-09 01:10:20', 'updated bug', 'BUG_UPDATED', 'http://localhost:4200/dashboard/bugs?bugId=5', 4);
insert into notifications values(8, '2001-09-09 01:10:20', 'welcome user', 'BUG_STATUS_UPDATED', 'http://localhost:4200/dashboard/bugs?bugId=1', 1);
|
/*
37)DECODE 또는 CASE WHEN THEN 함수를 사용하여 다음 데이터에 따라 JOB열의 값을 기준으로
모든 사원의 등급을 표시하시오.
업무 등급
PRESIDENT A
ANALYST B
MANAGER C
SALESMAN D
CLERK E
기타 0
*/
SELECT ENAME, JOB,
CASE JOB
WHEN 'PRESIDENT' THEN 'A'
WHEN 'ANALYST' THEN 'B'
WHEN 'MANAGER' THEN 'C'
WHEN 'SALESMAN' THEN 'D'
WHEN 'CLERK' THEN 'E'
ELSE '0'
END
FROM EMP;
SELECT ENAME, JOB,
DECODE( JOB,
'PRESIDENT', 'A',
'ANALYST', 'B',
'MANAGER', 'C',
'SALESMAN', 'D',
'CLERK', 'E',
0 ) AS GRADE
FROM EMP;
-- 60) BLAKE와 같은 부서에 있는 사원들의 이름과 입사일을 구하는데
-- BLAKE는 제외하고 출력하시오.(BLAKE가 여러명일 수 있음)
SELECT ename, hiredate
FROM emp
WHERE deptno IN (SELECT deptno FROM emp WHERE ename = 'BLAKE')
AND ename NOT IN('BLAKE');
-- 61) 평균급여보다 많은 급여를 받는 사원들의 사원번호, 이름, 월급을 출력하는데
-- 월급이 높은 사람순으로 출력하시오.
SELECT empno, ename, sal
FROM emp
WHERE sal > (SELECT AVG(SAL) FROM EMP)
ORDER BY sal DESC;
-- 62) 10번부서에서 급여를 가장 적게 받는 사원과 동일한 급여를 받는 사원의 이름을 출력하시오.
SELECT ename, sal
FROM emp
WHERE sal IN (SELECT MIN(sal) FROM emp WHERE deptno LIKE '10');
-- 63) 사원수가 3명이 넘는 부서의 부서명과 사원수를 출력하시오. *어려웠지만 혼자 풀음!
SELECT d.dname, COUNT(*)
FROM EMP e INNER JOIN dept d ON e.deptno = d.deptno
WHERE e.deptno IN (SELECT deptno FROM emp GROUP BY deptno HAVING COUNT(*) > 3)
GROUP BY d.dname;
-- 64) 사원번호가 7844인 사원보다 빨리 입사한 사원의 이름과 입사일을 출력하시오.
SELECT ename, hiredate
FROM EMP
WHERE hiredate < (SELECT hiredate FROM emp WHERE empno = '7844');
-- 65) 직속상사가 KING인 모든 사원의 이름과 급여를 출력하시오.
SELECT ename, sal
FROM EMP
WHERE mgr IN (SELECT empno FROM EMP WHERE ename LIKE 'KING');
-- 66) 20번 부서에서 가장 급여를 많이 받는 사원과 동일한 급여를 받는
-- 사원의 이름과 부서명,급여, 급여등급을 출력하시오.(emp, dept, salgrade) * 세개의 테이블 JOIN하는 ANSI SQL 문법 알아두기
SELECT e.ename, d.dname, e.sal, s.grade
FROM emp e
INNER JOIN dept d
ON e.deptno = d.deptno
INNER JOIN salgrade s
ON e.sal BETWEEN s.losal and s.hisal
WHERE sal IN (SELECT MAX(sal) FROM emp WHERE deptno = 20);
--67) 총급여sal+comm가 평균 급여보다 많은 급여를 받는 사람의 부서번호, 이름, 총급여,
-- 커미션을 출력하시오.(커미션은 유(O),무(X)로 표시하고 컬럼명은 "comm유무" 출력) ***
SELECT empno, ename, sal + NVL(comm, '0') AS 총급여, NVL2(comm,'유','무') AS 커미션여부
FROM emp
WHERE ename IN (SELECT ename FROM EMP WHERE sal + NVL(comm,'0') > (SELECT AVG(sal) FROM emp ));
-- 68) CHICAGO 지역에서 근무하는 사원의 평균 급여보다 높은 급여를 받는
-- 사원의 이름과 급여, 지역명을 출력하시오.
SELECT e.ename, e.sal, d.loc
FROM emp e, dept d
WHERE e.deptno = d.deptno
AND sal > (SELECT AVG(e.sal) FROM EMP e, dept d WHERE e.deptno = d.deptno AND d.loc = 'CHICAGO');
-- 69) 업무가 SALESMAN인 직원이 2명 이상인 부서의
-- 이름, 근무하는 사원의 이름, 업무를 출력 하시오.
-- (컬럼명은 부서명, 사원명, 업무로 출력)
SELECT d.dname as 부서명, e.ename as 사원명, e.job as 업무
FROM emp e, dept d
WHERE e.deptno = d.deptno
AND e.deptno IN (SELECT deptno FROM emp WHERE job LIKE 'SALESMAN' GROUP BY deptno HAVING COUNT(*) >= 2 );
-- 70) 커미션이 없는 사원들 중 월급이 가장 높은 사원의 이름과 급여등급을 출력하시오.
SELECT e.ename, s.grade
FROM EMP e INNER JOIN salgrade s
ON e.sal BETWEEN s.losal and s.hisal
WHERE e.sal IN (SELECT MAX(sal) FROM emp WHERE comm IS NULL OR comm = 0);
-- 71) SMITH의 관리자의 이름과 부서명, 근무지역을 출력하시오.
SELECT e.ename, d.dname, d.loc
FROM emp e INNER JOIN dept d
ON e.deptno = d.deptno
WHERE e.empno IN (SELECT m.empno FROM emp e INNER JOIN emp m ON e.mgr = m.empno WHERE e.ename LIKE 'SMITH');
-- 다른 방법
SELECT e.ename, d.dname, d.loc
FROM emp e INNER JOIN dept d
ON e.deptno = d.deptno
WHERE e.empno IN (SELECT mgr FROM emp WHERE ename LIKE 'SMITH') |
DROP TABLE IF EXISTS PURCHASE_GIFT_CARD;
CREATE TABLE PURCHASE_GIFT_CARD
(
GCARD_ID VARCHAR(4),
CUST_ID INT,
PRICE DECIMAL(5,2),
TRANS_ID INT
);
ALTER TABLE PURCHASE_GIFT_CARD ADD CONSTRAINT PK_BUY_GCARD PRIMARY KEY(GCARD_ID);
ALTER TABLE PURCHASE_GIFT_CARD ADD CONSTRAINT FK_PAY_GCARD FOREIGN KEY(TRANS_ID) REFERENCES TRANSACTIONS(TRANS_ID);
ALTER TABLE PURCHASE_GIFT_CARD ADD CONSTRAINT FK_GCARD_BUYED FOREIGN KEY(GCARD_ID) REFERENCES GIFT_CARD(GCARD_ID);
ALTER TABLE PURCHASE_GIFT_CARD ADD CONSTRAINT FK_CUST FOREIGN KEY(CUST_ID) REFERENCES CUSTOMER(CUST_ID); |
drop table results;
create table results
( userno varchar(25),
topicname varchar(20),
score int,
scoreoutof int,
percentage int,
timetaken number(7,2)
); |
CREATE OR REPLACE VIEW vRecesso AS
SELECT c.data_de_submissao, r.abrangencia, r.descricao, r.inicio, r.fim
FROM Calendario AS c, Recesso AS r;
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 24, 2020 at 11:52 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
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_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `studentmanagement`
--
-- --------------------------------------------------------
--
-- Table structure for table `challenges`
--
CREATE TABLE `challenges` (
`challengeid` int(11) NOT NULL,
`challengename` varchar(50) NOT NULL,
`suggest` varchar(500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `challenges`
--
INSERT INTO `challenges` (`challengeid`, `challengename`, `suggest`) VALUES
(1, 'test', 'ROLE_ADMIN'),
(2, 'tesst', 'ROLE_USER'),
(3, '123123123', '123123123'),
(4, 'test challenge', 'day la dap an');
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE `messages` (
`messageid` int(11) NOT NULL,
`messagecontent` varchar(200) DEFAULT NULL,
`senderid` int(11) DEFAULT NULL,
`receiverid` int(11) DEFAULT NULL,
`datecreated` datetime(3) DEFAULT NULL,
`status` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `messages`
--
INSERT INTO `messages` (`messageid`, `messagecontent`, `senderid`, `receiverid`, `datecreated`, `status`) VALUES
(1, '123', 2, 1, '2000-04-10 00:00:00.000', 1),
(2, '321', 1, 2, '2000-04-10 00:00:00.000', 1),
(3, 'admin gui bi sua', 1, 2, '2020-09-21 11:10:19.000', 3),
(4, 'user gui', 2, 1, '2020-09-21 11:13:04.000', 1),
(7, 'admin test gui', 1, 2, '2020-09-21 12:03:34.000', 2),
(10, 'test123', 1, 2, '2020-09-21 13:52:22.000', 3),
(11, 'test1', 1, 10, '2020-09-21 14:14:58.000', 2),
(12, '321', 1, 2, '2020-09-24 09:28:41.000', 3);
-- --------------------------------------------------------
--
-- Table structure for table `tasks`
--
CREATE TABLE `tasks` (
`taskid` int(11) NOT NULL,
`taskname` varchar(50) DEFAULT NULL,
`description` varchar(200) DEFAULT NULL,
`attachfile` varchar(500) DEFAULT NULL,
`datecreated` datetime(3) DEFAULT NULL,
`username` varchar(255) DEFAULT NULL,
`parents` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `tasks`
--
INSERT INTO `tasks` (`taskid`, `taskname`, `description`, `attachfile`, `datecreated`, `username`, `parents`) VALUES
(1, 'toan hoc', 'hoc toan', 'G:\\ProjectATTT\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp1\\wtpwebapps\\SecuritySpring\\upload\\FFmpegMediaInfo_1.2.zip', '2020-09-21 17:56:14.000', 'admin', 0),
(4, 'test', '123', 'Sachvui.Com-day-con-lam-giau-tap-1.epub', '2020-09-21 21:55:25.000', 'admin', 0),
(7, '213123', 'file', 'file', '2020-09-23 16:23:27.000', 'admin', 0),
(8, '123123', 'HD nghiep vu phong chong dich benh theo quy trinh BCM_1.0.doc', 'HD nghiep vu phong chong dich benh theo quy trinh BCM_1.0.doc', '2020-09-23 16:25:11.000', 'admin', 0),
(11, 'ádfasdfasdf', '[08-09-2020]Danh-sach-cac-server.xlsx', '[08-09-2020]Danh-sach-cac-server.xlsx', '2020-09-23 17:08:11.000', 'admin', 1),
(12, '123123123', '8-13-2020 3-40-54 PM.png', '8-13-2020 3-40-54 PM.png', '2020-09-23 17:12:03.000', 'admin', 1),
(13, 'ádfasdfasdfasdfasdfasdf', 'mau-them-danh-sach-cau-hoi (1).xlsx', 'mau-them-danh-sach-cau-hoi (1).xlsx', '2020-09-23 17:22:10.000', 'admin', 4),
(14, '', 'cmd.zip', 'cmd.zip', '2020-09-23 17:38:29.000', 'admin', 4),
(15, '123', '103449360_SR_SietKetNoi_10.60.92.234.xlsx', '103449360_SR_SietKetNoi_10.60.92.234.xlsx', '2020-09-23 19:10:32.000', 'admin', 11),
(16, '123', NULL, 'jmeter-plugins-manager-1.4.jar', '2020-09-24 00:43:54.000', 'user', 11);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`userid` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(200) DEFAULT NULL,
`fullname` varchar(50) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,
`phone` varchar(13) DEFAULT NULL,
`role` varchar(11) DEFAULT NULL,
`enabled` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`userid`, `username`, `password`, `fullname`, `email`, `phone`, `role`, `enabled`) VALUES
(1, 'admin', '$2a$10$5G.JBOyWXI0vjMhg.JwvYuIQvliQn8TRlvy3NDrwoZpxPd3i86/VK', 'Pham van vu', 'vupv8@viettel.vn', '0123456789', 'ADMIN', 1),
(2, 'user', '$2a$10$4UaZdwjXqfsgU5fVVLd9auzWzvZKImzl.QLXEcbE/N7vZjBiY6cfK', 'Pham van vu', 'vupv8@viettel.vn', '0398907953', 'USER', 1);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `challenges`
--
ALTER TABLE `challenges`
ADD PRIMARY KEY (`challengeid`);
--
-- Indexes for table `messages`
--
ALTER TABLE `messages`
ADD PRIMARY KEY (`messageid`);
--
-- Indexes for table `tasks`
--
ALTER TABLE `tasks`
ADD PRIMARY KEY (`taskid`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`userid`),
ADD UNIQUE KEY `UserName` (`username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `challenges`
--
ALTER TABLE `challenges`
MODIFY `challengeid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
MODIFY `messageid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `tasks`
--
ALTER TABLE `tasks`
MODIFY `taskid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `userid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 06, 2018 at 01:24 PM
-- 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 @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `hd_data`
--
-- --------------------------------------------------------
--
-- Table structure for table `campus`
--
CREATE TABLE `campus` (
`CAMPUS_ID` int(4) NOT NULL,
`CAMPUS_NAME` varchar(120) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `campus`
--
INSERT INTO `campus` (`CAMPUS_ID`, `CAMPUS_NAME`) VALUES
(1001, 'CEG'),
(1002, 'ACT'),
(1003, 'SAP'),
(1004, 'MIT'),
(1005, 'University Colleges');
-- --------------------------------------------------------
--
-- Table structure for table `item`
--
CREATE TABLE `item` (
`ITEM` int(4) NOT NULL,
`ITEM_NAME` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `item`
--
INSERT INTO `item` (`ITEM`, `ITEM_NAME`) VALUES
(1, 'Desktop'),
(2, 'Server'),
(3, 'Laptop'),
(4, 'Workstation'),
(5, 'Printer'),
(6, 'iMac'),
(7, 'Network');
-- --------------------------------------------------------
--
-- Stand-in structure for view `item_count`
-- (See below for the actual view)
--
CREATE TABLE `item_count` (
`ITEM_NAME` varchar(60)
,`COUNT(*)` bigint(21)
);
-- --------------------------------------------------------
--
-- Table structure for table `page_1`
--
CREATE TABLE `page_1` (
`ID` int(5) NOT NULL,
`PAGE_CONTENT` varchar(120) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `page_1`
--
INSERT INTO `page_1` (`ID`, `PAGE_CONTENT`) VALUES
(1, 'Clearly specify the problem'),
(2, 'Provide the exact location of the systems'),
(3, 'Remember to note down the ticket number to check the status'),
(4, 'Dont register the same complaints again and again'),
(5, 'For further clarification contact intercom number.');
-- --------------------------------------------------------
--
-- Table structure for table `rcc_purchase`
--
CREATE TABLE `rcc_purchase` (
`SLNO` int(6) NOT NULL,
`PUR_DATE` date NOT NULL,
`ITEM_NO` int(6) NOT NULL,
`MAKE` varchar(60) NOT NULL,
`ITEM_NAME` varchar(60) NOT NULL,
`ITME_DESCRIPTION` varchar(200) NOT NULL,
`PO_YEAR` varchar(16) NOT NULL,
`CAMPUS` varchar(60) NOT NULL,
`DEPARTMENT` varchar(120) NOT NULL,
`VENDOR` varchar(120) NOT NULL,
`VENDOR2` varchar(60) NOT NULL,
`VENDOR3` varchar(60) NOT NULL,
`PRICE_PER_ITEM` varchar(16) NOT NULL,
`WARRANTY_EXPIRE_DATE` varchar(10) NOT NULL,
`AMC` varchar(20) NOT NULL,
`NO_OF_ITEM` int(6) NOT NULL,
`FILE_ID` int(10) NOT NULL,
`FILE_NAME` varchar(120) NOT NULL,
`FILE_TYPE` varchar(60) NOT NULL,
`FILE_SIZE` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `rcc_purchase`
--
INSERT INTO `rcc_purchase` (`SLNO`, `PUR_DATE`, `ITEM_NO`, `MAKE`, `ITEM_NAME`, `ITME_DESCRIPTION`, `PO_YEAR`, `CAMPUS`, `DEPARTMENT`, `VENDOR`, `VENDOR2`, `VENDOR3`, `PRICE_PER_ITEM`, `WARRANTY_EXPIRE_DATE`, `AMC`, `NO_OF_ITEM`, `FILE_ID`, `FILE_NAME`, `FILE_TYPE`, `FILE_SIZE`) VALUES
(0, '0000-00-00', 1, '', 'Desktop', 'i5', '', '', '', 'RAJALAKSHMI SYSTEM PVT.LTD\r\n', '', '', '49000', '3', '', 1, 0, ' 1 -mysql_tutorial.pdf', 'application/pdf', 678643),
(0, '0000-00-00', 2, '', 'Server', 'High End 256RAM', '', '', '', 'RAJALAKSHMI SYSTEM PVT.LTD', '', '', '100000', '5', '', 1, 0, ' 2 -mysql_tutorial.pdf', 'application/pdf', 678643),
(0, '0000-00-00', 3, '', 'Laptop', 'i5 HP', '', '', '', 'RAJALAKSHMI SYSTEM PVT.LTD', '', '', '68000', '5', '', 1, 0, ' 3 -mysql_tutorial.pdf', 'application/pdf', 678643),
(0, '0000-00-00', 4, '', 'Workstation', 'HP 201 64G RAM', '', '', '', 'R2', '', '', '120000', '5', '', 1, 0, ' 4 -mysql-tutorial-excerpt-5.5-en.pdf', 'application/pdf', 198174),
(0, '0000-00-00', 5, '', 'iMac', 'iMac', '', '', '', 'V1', '', '', '169000', '5', '', 1, 0, ' 5 -mysql_tutorial.pdf', 'application/pdf', 678643),
(0, '0000-00-00', 6, '', 'Network', 'Server Rack', '', '', '', 'RAJALAKSHMI SYSTEM PVT.LTD', '', '', '28500', '3', '', 1, 0, '6-PO_Networking.pdf', 'application/pdf', 0),
(0, '0000-00-00', 7, '', 'Network', 'Switch', '', '', '', 'RAJALAKSHMI SYSTEM PVT.LTD', '', '', '38000', '5', '', 1, 0, ' 7 -PO_Networking.pdf', 'application/pdf', 3293594),
(0, '0000-00-00', 8, '', 'Desktop', 'i7', '', '', '', 'RAJALAKSHMI SYSTEM PVT.LTD', '', '', '60000', '5', '', 1, 0, ' 8 -PO_Networking.pdf', 'application/pdf', 3293594),
(0, '0000-00-00', 9, '', 'Desktop', 'i3', '', '', '', 'RAJALAKSHMI SYSTEM PVT.LTD', '', '', '40000', '5', '', 1, 0, ' 9 -PO_Networking.pdf', 'application/pdf', 3293594),
(0, '0000-00-00', 10, '', 'Desktop', 'Operating System: Windows 10 , RAM: 8GB, Processor: Intel Co', '', '', '', 'RAJALAKSHMI SYSTEM PVT.LTD', '', '', '58000', '3', '', 1, 0, ' 10 -PO_Networking.pdf', 'application/pdf', 3293594),
(0, '0000-00-00', 11, '', 'Server', 'HP ProLiant ML350 Gen9 Server With Intel Xeon E5-2620v3 Processor 8 GB-R, P440ar/2G Storage Controller And 8 Hot-Plug SFF SAS/SATA HDD Bays', '', '', '', 'RAJALAKSHMI SYSTEM PVT.LTD', '', '', '750000', '5', '', 1, 0, ' 11 -PO_Networking.pdf', 'application/pdf', 3293594),
(0, '0000-00-00', 12, 'HP', 'Server', 'HP ProLiant ML350 Gen9 Server With Intel Xeon E5-2620v3 Processor 32 GB-R, P440ar/2G Storage Controller And 8 Hot-Plug SFF SAS/SATA HDD Bays', '', '', '', 'RAJALAKSHMI SYSTEM PVT.LTD', 'X1', 'V1', '325000', '5', '', 1, 0, ' 12 -PO_Networking.pdf', 'application/pdf', 3293594),
(0, '0000-00-00', 13, 'Dell', 'Server', 'ML350 Gen9 Server With Intel Xeon E5-2620v3 Processor 32 GB-R, P440ar/2G Storage Controller And 8 Hot-Plug SFF SAS/SATA HDD Bays', '', '', '', 'R1', 'RAJALAKSHMI SYSTEM PVT.LTD', 'R2', '1200000', '5', '10', 1, 0, ' 13 -PO_Networking.pdf', 'application/pdf', 3293594),
(0, '0000-00-00', 14, 'HP', 'Laptop', 'i7, 6GB RAM', '', '', '', 'R1', 'R2', 'V1', '45000', '2', '2', 1, 0, ' 14 -mysql-tutorial-excerpt-5.5-en.pdf', 'application/pdf', 198174);
-- --------------------------------------------------------
--
-- Table structure for table `rcc_pur_dept_apply`
--
CREATE TABLE `rcc_pur_dept_apply` (
`SLNO` int(6) NOT NULL,
`PUR_DATE` date NOT NULL,
`ITEM_NO` int(6) NOT NULL,
`ITEM_NAME` varchar(60) NOT NULL,
`ITME_DESCRIPTION` varchar(200) NOT NULL,
`PO_YEAR` varchar(16) NOT NULL,
`CAMPUS` varchar(60) NOT NULL,
`DEPARTMENT` varchar(120) NOT NULL,
`VENDOR` varchar(120) NOT NULL,
`PRICE_PER_ITEM` varchar(16) NOT NULL,
`WARRANTY_EXPIRE_DATE` varchar(10) NOT NULL,
`NO_OF_ITEM` int(6) NOT NULL,
`FILE_ID` int(10) NOT NULL,
`FILE_NAME` varchar(120) NOT NULL,
`FILE_TYPE` varchar(60) NOT NULL,
`FILE_SIZE` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `rcc_pur_from_babu`
--
CREATE TABLE `rcc_pur_from_babu` (
`SL_NO` int(10) NOT NULL,
`PO_YEAR` int(10) NOT NULL,
`ITEM_NAME` varchar(11) NOT NULL,
`ITME_DESCRIPTION` varchar(19) NOT NULL,
`DEPARTMENT` varchar(45) NOT NULL,
`NO_OF_ITEM` int(10) NOT NULL,
`PUR_DATE1` varchar(10) NOT NULL,
`PRICE_PER_ITEM` int(10) NOT NULL,
`ITEM_NO` int(4) NOT NULL,
`PUR_DATE` date NOT NULL,
`CAMPUS` varchar(60) NOT NULL,
`WARRANTY_EXPIRE_DATE` date NOT NULL,
`VENDOR` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `rcc_pur_from_babu`
--
INSERT INTO `rcc_pur_from_babu` (`SL_NO`, `PO_YEAR`, `ITEM_NAME`, `ITME_DESCRIPTION`, `DEPARTMENT`, `NO_OF_ITEM`, `PUR_DATE1`, `PRICE_PER_ITEM`, `ITEM_NO`, `PUR_DATE`, `CAMPUS`, `WARRANTY_EXPIRE_DATE`, `VENDOR`) VALUES
(1, 2014, 'Desktop', 'Desktop Computer i3', 'Examination Centre', 18, '23.09.2014', 672673, 1000, '0000-00-00', '', '0000-00-00', ''),
(2, 2014, 'Desktop', 'Desktop Computer i3', 'CTDT', 3, '23.09.2014', 157278, 1001, '0000-00-00', '', '0000-00-00', ''),
(3, 2014, 'Desktop', 'Desktop Computer i3', 'Biotechnolgy UIC', 2, '29.09.2014', 73739, 1002, '0000-00-00', '', '0000-00-00', ''),
(4, 2014, 'Desktop', 'Desktop Computer i5', 'CIPR', 5, '29.09.2014', 224755, 1003, '0000-00-00', '', '0000-00-00', ''),
(5, 2014, 'Desktop', 'Desktop Computer i5', 'IQAC', 2, '29.09.2014', 89902, 1004, '0000-00-00', '', '0000-00-00', ''),
(6, 2014, 'Desktop', 'Desktop Computer i3', 'Computer Technology MIT', 40, '29.12.2014', 1474788, 1005, '0000-00-00', '', '0000-00-00', ''),
(7, 2014, 'Desktop', 'Desktop Computer i3', 'Civil Engineering CEG Campus', 5, '29.12.2014', 184349, 1006, '0000-00-00', '', '0000-00-00', ''),
(8, 2014, 'Desktop', 'Desktop Computer i3', 'Ref./Ac Division Mech', 4, '29.12.2014', 147479, 1007, '0000-00-00', '', '0000-00-00', ''),
(9, 2014, 'Desktop', 'Desktop Computer i3', 'Physics dept. CEG Campus', 2, '29.12.2014', 73739, 1008, '0000-00-00', '', '0000-00-00', ''),
(10, 2014, 'Desktop', 'Desktop Computer i3', 'Applied Sci. and Tech. A.C.Tech Cam', 2, '29.12.2014', 73739, 1009, '0000-00-00', '', '0000-00-00', ''),
(11, 2014, 'Desktop', 'Desktop Computer i3', 'Industrial Engg. CEG Campus', 6, '29.12.2014', 221218, 1010, '0000-00-00', '', '0000-00-00', ''),
(12, 2014, 'Desktop', 'Desktop Computer i5', 'EEE CEG Campus', 7, '29.12.2014', 314656, 1011, '0000-00-00', '', '0000-00-00', ''),
(13, 2014, 'Desktop', 'Desktop Computer i5', 'Student Affairs', 6, '29.12.2014', 269706, 1012, '0000-00-00', '', '0000-00-00', ''),
(14, 2014, 'Desktop', 'Desktop Computer i5', 'Printing Technology', 5, '29.12.2014', 224755, 1013, '0000-00-00', '', '0000-00-00', ''),
(15, 2014, 'Desktop', 'Desktop Computer i5', 'The Library CEG Campus', 2, '29.12.2014', 89902, 1014, '0000-00-00', '', '0000-00-00', ''),
(16, 2014, 'Desktop', 'Desktop Computer i5', 'Physics dept. CEG Campus', 1, '29.12.2014', 44951, 1015, '0000-00-00', '', '0000-00-00', ''),
(17, 2014, 'Desktop', 'Desktop Computer i7', 'Electronics Engg. MIT Campus', 88, '29.12.2014', 4531296, 1016, '0000-00-00', '', '0000-00-00', ''),
(18, 2014, 'Desktop', 'Desktop Computer i7', 'Dean A.C.Tech. ', 20, '29.12.2014', 1029840, 1017, '0000-00-00', '', '0000-00-00', ''),
(19, 2014, 'Desktop', 'Desktop Computer i7', 'ECE CEG Campus', 12, '29.12.2014', 617904, 1018, '0000-00-00', '', '0000-00-00', ''),
(20, 2014, 'Desktop', 'Desktop Computer i7', 'Computer Tech. MIT Campus', 10, '29.12.2014', 514920, 1019, '0000-00-00', '', '0000-00-00', ''),
(21, 2014, 'Desktop', 'Desktop Computer i7', 'Library Main Campus', 6, '29.12.2014', 308952, 1020, '0000-00-00', '', '0000-00-00', ''),
(22, 2014, 'Desktop', 'Desktop Computer i7', 'ACOE Main Campus', 5, '29.12.2014', 257460, 1021, '0000-00-00', '', '0000-00-00', ''),
(23, 2014, 'Desktop', 'Desktop Computer i7', 'Dean A.C.Tech. ', 5, '29.12.2014', 257460, 1022, '0000-00-00', '', '0000-00-00', ''),
(24, 2014, 'Desktop', 'Desktop Computer i7', 'Knowledge Data Centre', 5, '29.12.2014', 257460, 1023, '0000-00-00', '', '0000-00-00', ''),
(25, 2014, 'Desktop', 'Desktop Computer i7', 'EEE CEG Campus', 4, '29.12.2014', 205968, 1024, '0000-00-00', '', '0000-00-00', ''),
(26, 2014, 'Desktop', 'Desktop Computer i7', 'Printing Tech. CEG Campus', 2, '29.12.2014', 102984, 1025, '0000-00-00', '', '0000-00-00', ''),
(27, 2014, 'Desktop', 'Desktop Computer i7', 'Health Centre CEG Campus', 1, '29.12.2014', 51492, 1026, '0000-00-00', '', '0000-00-00', ''),
(28, 2015, 'Desktop', 'Desktop Computer i3', 'Mathematics CEG Campus', 35, '02.03.2015', 1035854, 1027, '0000-00-00', '', '0000-00-00', ''),
(29, 2015, 'Desktop', 'Desktop Computer i3', 'Mathematics CEG Campus', 2, '02.03.2015', 59192, 1028, '0000-00-00', '', '0000-00-00', ''),
(30, 2015, 'Desktop', 'Desktop Computer i7', 'Mathematics CEG Campus', 2, '02.03.2015', 101454, 1029, '0000-00-00', '', '0000-00-00', ''),
(31, 2015, 'Desktop', 'Desktop Computer i3', 'Geology CEG Campus', 25, '02.03.2015', 739896, 1030, '0000-00-00', '', '0000-00-00', ''),
(32, 2015, 'Desktop', 'Desktop Computer i5', 'CES CEG Campus', 5, '02.03.2015', 199298, 1031, '0000-00-00', '', '0000-00-00', ''),
(33, 2015, 'Desktop', 'Desktop Computer i5', 'Dean MIT Campus', 4, '02.03.2015', 159438, 1032, '0000-00-00', '', '0000-00-00', ''),
(34, 2015, 'Desktop', 'Desktop Computer i5', 'Media Science CEG Campus', 5, '02.03.2015', 199298, 1033, '0000-00-00', '', '0000-00-00', ''),
(35, 2015, 'Desktop', 'Desktop Computer i5', 'Manufacturing Engg CEG Campus', 15, '02.03.2015', 597894, 1034, '0000-00-00', '', '0000-00-00', ''),
(36, 2015, 'Desktop', 'Desktop Computer i5', 'Architecture SAP Campus', 4, '02.03.2015', 159438, 1035, '0000-00-00', '', '0000-00-00', ''),
(37, 2015, 'Desktop', 'Desktop Computer i5', 'Distance Education CEG Campus', 10, '02.03.2015', 398596, 1036, '0000-00-00', '', '0000-00-00', ''),
(38, 2015, 'Desktop', 'Desktop Computer i7', 'Distance Education CEG Campus', 5, '02.03.2015', 253635, 1037, '0000-00-00', '', '0000-00-00', ''),
(39, 2015, 'Desktop', 'Desktop Computer i7', 'Sciences and Humanities MIT Campus', 1, '02.03.2015', 50727, 1038, '0000-00-00', '', '0000-00-00', ''),
(40, 2015, 'Desktop', 'Desktop Computer i7', 'Co-ordination Section AU', 1, '02.03.2015', 50727, 1039, '0000-00-00', '', '0000-00-00', ''),
(41, 2015, 'Desktop', 'Desktop Computer i7', 'IQAC AU', 1, '02.03.2015', 50727, 1040, '0000-00-00', '', '0000-00-00', ''),
(42, 2015, 'Desktop', 'Desktop Computer i3', 'Head ECE ', 50, '11.03.2015', 1597917, 1041, '0000-00-00', '', '0000-00-00', ''),
(43, 2015, 'Desktop', 'Desktop Computer i5', 'Centre for Research', 10, '11.03.2015', 398596, 1042, '0000-00-00', '', '0000-00-00', ''),
(44, 2015, 'Desktop', 'Desktop Computer i5', 'Architecture SAP Campus', 2, '11.03.2015', 79719, 1043, '0000-00-00', '', '0000-00-00', ''),
(45, 2015, 'Desktop', 'Desktop Computer i7', 'Registrar Salary Section', 8, '11.03.2015', 405817, 1044, '0000-00-00', '', '0000-00-00', ''),
(46, 2015, 'Desktop', 'Desktop Computer i7', 'Registrar AU', 3, '13.03.2015', 152181, 1045, '0000-00-00', '', '0000-00-00', ''),
(47, 2015, 'Desktop', 'Desktop Computer i7', 'Centre For CC', 1, '16.03.2015', 50727, 1046, '0000-00-00', '', '0000-00-00', ''),
(48, 2015, 'Desktop', 'Desktop Computer i3', 'Director CUIC', 48, '06.10.2015', 1520352, 1047, '0000-00-00', '', '0000-00-00', ''),
(49, 2015, 'Desktop', 'Desktop Computer i3', 'Co-ordinator MHRD', 4, '06.10.2015', 126696, 1048, '0000-00-00', '', '0000-00-00', ''),
(50, 2015, 'Desktop', 'Desktop Computer i3', 'Head EEE CEG Campus', 3, '06.10.2015', 95022, 1049, '0000-00-00', '', '0000-00-00', ''),
(51, 2015, 'Desktop', 'Desktop Computer i3', 'Head Nanoscience and Tech.', 1, '06.10.2015', 31674, 1050, '0000-00-00', '', '0000-00-00', ''),
(52, 2015, 'Desktop', 'Desktop Computer i5', 'Prof. Electronics Engg. MIT Campus', 2, '06.10.2015', 78048, 1051, '0000-00-00', '', '0000-00-00', ''),
(53, 2015, 'Desktop', 'Desktop Computer i5', 'Director IRS CEG Campus', 6, '06.10.2015', 234144, 1052, '0000-00-00', '', '0000-00-00', ''),
(54, 2015, 'Desktop', 'Desktop Computer i5', 'Prof. Textile Tech. A.C.Tech.', 3, '06.10.2015', 117072, 1053, '0000-00-00', '', '0000-00-00', ''),
(55, 2015, 'Desktop', 'Desktop Computer i5', 'Health Centre CEG Campus', 2, '06.10.2015', 78048, 1054, '0000-00-00', '', '0000-00-00', ''),
(56, 2015, 'Desktop', 'Desktop Computer i7', 'Prof. Mechanical Engg. CEG Campus', 1, '06.10.2015', 50296, 1055, '0000-00-00', '', '0000-00-00', ''),
(57, 2015, 'Desktop', 'Desktop Computer i7', 'Director Recruitment Cell', 3, '06.10.2015', 150888, 1056, '0000-00-00', '', '0000-00-00', ''),
(58, 2015, 'Desktop', 'Desktop Computer i7', 'Director Crystal Growth Centre', 6, '06.10.2015', 301776, 1057, '0000-00-00', '', '0000-00-00', ''),
(59, 2015, 'Desktop', 'Desktop Computer i7', 'RTI Section Au', 1, '06.10.2015', 50296, 1058, '0000-00-00', '', '0000-00-00', ''),
(60, 2015, 'Desktop', 'Desktop Computer i7', 'Head CSE', 50, '06.10.2015', 2514800, 1059, '0000-00-00', '', '0000-00-00', ''),
(61, 2015, 'Desktop', 'Desktop Computer i7', 'Director EMRC', 3, '06.10.2015', 150888, 1060, '0000-00-00', '', '0000-00-00', ''),
(62, 2015, 'Desktop', 'Desktop Computer i5', 'Head Nanoscience and Tech.', 1, '12.10.2015', 39024, 1061, '0000-00-00', '', '0000-00-00', ''),
(63, 2015, 'Desktop', 'Desktop Computer i7', 'Head CSE CEG Campus', 10, '06.11.2015', 518700, 1062, '0000-00-00', '', '0000-00-00', ''),
(64, 2015, 'Desktop', 'Desktop Computer i7', 'Head Manufacturing Engg', 2, '06.11.2015', 124000, 1063, '0000-00-00', '', '0000-00-00', ''),
(65, 2015, 'Desktop', 'Desktop Computer i7', 'Director P&D', 1, '06.11.2015', 62000, 1064, '0000-00-00', '', '0000-00-00', ''),
(66, 2015, 'Desktop', 'Desktop Computer i3', 'Head Computer Centre MIT', 16, '22.12.2015', 506784, 1065, '0000-00-00', '', '0000-00-00', ''),
(67, 2015, 'Desktop', 'Desktop Computer i3', 'Head Computer Tech. MIT', 3, '22.12.2015', 95022, 1066, '0000-00-00', '', '0000-00-00', ''),
(68, 2015, 'Desktop', 'Desktop Computer i3', 'Head Applied Science & Humanities', 1, '22.12.2015', 31674, 1067, '0000-00-00', '', '0000-00-00', ''),
(69, 2015, 'Desktop', 'Desktop Computer i5', 'Director Nanoscience and Tech.', 1, '22.12.2015', 39024, 1068, '0000-00-00', '', '0000-00-00', ''),
(70, 2015, 'Desktop', 'Desktop Computer i5', 'Head MBA', 10, '22.12.2015', 390240, 1069, '0000-00-00', '', '0000-00-00', ''),
(71, 2015, 'Desktop', 'Desktop Computer i5', 'Head MBA', 5, '22.12.2015', 195120, 1070, '0000-00-00', '', '0000-00-00', ''),
(72, 2015, 'Desktop', 'Desktop Computer i5', 'Head Aerospace Engineering', 5, '22.12.2015', 195120, 1071, '0000-00-00', '', '0000-00-00', ''),
(73, 2015, 'Desktop', 'Desktop Computer i5', 'Head Rubber and Plastics Engg.', 9, '22.12.2015', 351216, 1072, '0000-00-00', '', '0000-00-00', ''),
(74, 2015, 'Desktop', 'Desktop Computer i5', 'Head ECE CEG Campus', 3, '22.12.2015', 117072, 1073, '0000-00-00', '', '0000-00-00', ''),
(75, 2015, 'Desktop', 'Desktop Computer i5', 'Head Nanoscience and Tech.', 1, '22.12.2015', 39024, 1074, '0000-00-00', '', '0000-00-00', ''),
(76, 2015, 'Desktop', 'Desktop Computer i5', 'Co-ordinator Applied Sci. & Hum. MIT', 5, '22.12.2015', 195120, 1075, '0000-00-00', '', '0000-00-00', ''),
(77, 2015, 'Desktop', 'Desktop Computer i5', 'Head Applied Science & Technology', 20, '22.12.2015', 780480, 1076, '0000-00-00', '', '0000-00-00', ''),
(78, 2015, 'Desktop', 'Desktop Computer i5', 'Dean SAP Campus (Architecture)', 35, '22.12.2015', 1365840, 1077, '0000-00-00', '', '0000-00-00', ''),
(79, 2015, 'Desktop', 'Desktop Computer i5', 'Head Printing Technology', 3, '22.12.2015', 117072, 1078, '0000-00-00', '', '0000-00-00', ''),
(80, 2015, 'Desktop', 'Desktop Computer i5', 'Director Library CEG Campus', 15, '22.12.2015', 585360, 1079, '0000-00-00', '', '0000-00-00', ''),
(81, 2015, 'Desktop', 'Desktop Computer i5', 'Head IT MIT Campus', 1, '22.12.2015', 39024, 1080, '0000-00-00', '', '0000-00-00', ''),
(82, 2015, 'Desktop', 'Desktop Computer i5', 'Head Textile Technology', 13, '22.12.2015', 507312, 1081, '0000-00-00', '', '0000-00-00', ''),
(83, 2015, 'Desktop', 'Desktop Computer i7', 'Director Crystal Growth Centre', 6, '22.12.2015', 301776, 1082, '0000-00-00', '', '0000-00-00', ''),
(84, 2015, 'Desktop', 'Desktop Computer i7', 'Head Nanoscience and Tech.', 1, '22.12.2015', 50296, 1083, '0000-00-00', '', '0000-00-00', ''),
(85, 2015, 'Desktop', 'Desktop Computer i7', 'Head CSE CEG Campus', 10, '22.12.2015', 502960, 1084, '0000-00-00', '', '0000-00-00', ''),
(86, 2015, 'Desktop', 'Desktop Computer i7', 'Head Applied Science and Tech. A.C.Tech.', 1, '22.12.2015', 50296, 1085, '0000-00-00', '', '0000-00-00', ''),
(87, 2015, 'Desktop', 'Desktop Computer i7', 'Head CSE CEG Campus', 59, '22.12.2015', 2967464, 1086, '0000-00-00', '', '0000-00-00', ''),
(88, 2015, 'Desktop', 'Desktop Computer i7', 'Head Printing Technology', 5, '22.12.2015', 251480, 1087, '0000-00-00', '', '0000-00-00', ''),
(89, 2015, 'Desktop', 'Desktop Computer i7', 'Head Instrumentation Engg. MIT Campus', 23, '22.12.2015', 1156808, 1088, '0000-00-00', '', '0000-00-00', ''),
(90, 2015, 'Desktop', 'Desktop Computer i7', 'Head Computer Tech. MIT', 5, '22.12.2015', 251480, 1089, '0000-00-00', '', '0000-00-00', ''),
(91, 2015, 'Desktop', 'Desktop Computer i7', 'Head IT MIT Campus', 5, '22.12.2015', 251480, 1090, '0000-00-00', '', '0000-00-00', ''),
(92, 2015, 'Desktop', 'Desktop Computer i7', 'Head Automobile Engg. MIT', 23, '22.12.2015', 1156808, 1091, '0000-00-00', '', '0000-00-00', ''),
(93, 2015, 'Desktop', 'Desktop Computer i7', 'Controller of Examinations AU', 31, '22.12.2015', 1559176, 1092, '0000-00-00', '', '0000-00-00', ''),
(94, 2015, 'Desktop', 'Desktop Computer i7', 'Head Production Tech. MIT', 7, '22.12.2015', 352072, 1093, '0000-00-00', '', '0000-00-00', ''),
(95, 2015, 'Desktop', 'Desktop Computer i3', 'Head Chemistry AU', 9, '22.12.2015', 285066, 1094, '0000-00-00', '', '0000-00-00', ''),
(96, 2015, 'Desktop', 'Desktop Computer i3', 'Head Mechancial Engg. CEG Campus', 5, '22.12.2015', 158370, 1095, '0000-00-00', '', '0000-00-00', ''),
(97, 2015, 'Desktop', 'Desktop Computer i5', 'Director IES CEG Campus', 4, '22.12.2015', 156096, 1096, '0000-00-00', '', '0000-00-00', ''),
(98, 2015, 'Desktop', 'Desktop Computer i5', 'Head Mechancial Engg. CEG Campus', 1, '22.12.2015', 39024, 1097, '0000-00-00', '', '0000-00-00', ''),
(99, 2015, 'Desktop', 'Desktop Computer i5', 'Head Computer Tech. MIT', 1, '22.12.2015', 39024, 1098, '0000-00-00', '', '0000-00-00', ''),
(100, 2015, 'Desktop', 'Desktop Computer i7', 'Head Internal Combustion Engg. Mech.', 2, '22.12.2015', 100592, 1099, '0000-00-00', '', '0000-00-00', ''),
(101, 2015, 'Desktop', 'Desktop Computer i7', 'Head Computer Tech. MIT', 2, '22.12.2015', 100592, 1100, '0000-00-00', '', '0000-00-00', ''),
(102, 2015, 'Desktop', 'Desktop Computer i7', 'Head Mining Engg. CEG Campus', 11, '22.12.2015', 553256, 1101, '0000-00-00', '', '0000-00-00', ''),
(103, 2016, 'Desktop', 'Desktop Computer i3', 'Head Mathematics AU', 25, '03.03.2016', 791850, 1102, '0000-00-00', '', '0000-00-00', ''),
(104, 2016, 'Desktop', 'Desktop Computer i3', 'Head Indl. Engg. CEG Campus', 16, '31.05.2016', 624384, 1103, '0000-00-00', '', '0000-00-00', ''),
(105, 2016, 'Desktop', 'Desktop Computer i3', 'Head Civil Engg. CEG Campus', 11, '31.05.2016', 429264, 1104, '0000-00-00', '', '0000-00-00', ''),
(106, 2016, 'Desktop', 'Desktop Computer i3', 'Head Aerospace Engineering MIT', 3, '31.05.2016', 150888, 1105, '0000-00-00', '', '0000-00-00', ''),
(107, 2016, 'Desktop', 'Desktop Computer i5', 'Secretary TNEA', 50, '31.05.2016', 2514800, 1106, '0000-00-00', '', '0000-00-00', ''),
(108, 2017, 'Desktop', 'Desktop Computer i7', 'Director Centre for Research', 5, '13.02.2017', 246750, 1107, '0000-00-00', '', '0000-00-00', ''),
(109, 2017, 'Desktop', 'Desktop Computer i7', 'Head Geology', 1, '13.02.2017', 49350, 1108, '0000-00-00', '', '0000-00-00', ''),
(110, 2017, 'Desktop', 'Desktop Computer i7', 'Director Aerospace Research', 5, '16.02.2017', 281400, 1109, '0000-00-00', '', '0000-00-00', ''),
(111, 2017, 'Desktop', 'Desktop Computer i7', 'Director IQAC', 3, '16.02.2017', 176085, 1110, '0000-00-00', '', '0000-00-00', ''),
(112, 2017, 'Desktop', 'Desktop Computer i7', 'Director P&D', 1, '16.02.2017', 58695, 1111, '0000-00-00', '', '0000-00-00', ''),
(113, 2017, 'Desktop', 'Desktop Computer i5', 'Head R&AC Div. Mechanical CEG Campus', 3, '16.02.2017', 126000, 1112, '0000-00-00', '', '0000-00-00', ''),
(114, 2017, 'Desktop', 'Desktop Computer i5', 'Head Transport Engg. Civil Engg. ', 2, '18.02.2017', 84000, 1113, '0000-00-00', '', '0000-00-00', ''),
(115, 2017, 'Desktop', 'Desktop Computer i7', 'Head DIST CEG Campus', 4, '24.02.2017', 197400, 1114, '0000-00-00', '', '0000-00-00', ''),
(116, 2017, 'Desktop', 'Desktop Computer i3', 'Head Mechancial Engg. CEG Campus', 3, '24.02.2017', 85500, 1115, '0000-00-00', '', '0000-00-00', ''),
(117, 2017, 'Desktop', 'Desktop Computer i7', 'Co-ordinator Science and Humanities MIT', 1, '28.02.2017', 58695, 1116, '0000-00-00', '', '0000-00-00', ''),
(118, 2017, 'Desktop', 'Desktop Computer i3', 'Head Science & Humanities MIT Campus', 1, '09.03.2017', 27500, 1117, '0000-00-00', '', '0000-00-00', ''),
(119, 2017, 'Desktop', 'Desktop Computer i5', 'FA 30 Section', 3, '22.06.2017', 132000, 1118, '0000-00-00', '', '0000-00-00', ''),
(120, 2017, 'Desktop', 'Desktop Computer i5', 'Purchase Section', 1, '22.06.2017', 44000, 1119, '0000-00-00', '', '0000-00-00', ''),
(121, 2017, 'Desktop', 'Desktop Computer i7', 'Head EEE CEG Campus', 1, '22.06.2017', 59900, 1120, '0000-00-00', '', '0000-00-00', ''),
(122, 2017, 'Desktop', 'Desktop Computer i5', 'Head Textile Technology', 3, '06.06.2017', 130980, 1121, '0000-00-00', '', '0000-00-00', ''),
(123, 2017, 'Desktop', 'Desktop Computer i5', 'Head Computer Tech. MIT', 1, '11.09.2017', 44000, 1122, '0000-00-00', '', '0000-00-00', ''),
(124, 2017, 'Desktop', 'Desktop Computer i5', 'Head Geology', 2, '11.09.2017', 88000, 1123, '0000-00-00', '', '0000-00-00', ''),
(125, 2017, 'Desktop', 'Desktop Computer i7', 'Centre for Water Resources', 8, '15.09.2017', 363440, 1124, '0000-00-00', '', '0000-00-00', ''),
(126, 2017, 'Desktop', 'Desktop Computer i7', 'Div. of Soil Mechanics', 8, '15.09.2017', 363440, 1125, '0000-00-00', '', '0000-00-00', ''),
(127, 2017, 'Desktop', 'Desktop Computer i7', 'Div. of Transportation Engg.', 10, '15.09.2017', 454300, 1126, '0000-00-00', '', '0000-00-00', ''),
(128, 2017, 'Desktop', 'Desktop Computer i7', 'Div. of Structural Engg.', 8, '15.09.2017', 363440, 1127, '0000-00-00', '', '0000-00-00', ''),
(129, 2017, 'Desktop', 'Desktop Computer i7', 'Institute of Ocean Management', 6, '15.09.2017', 272580, 1128, '0000-00-00', '', '0000-00-00', ''),
(130, 2017, 'Desktop', 'Desktop Computer i7', 'Centre for Environmental Studies', 9, '15.09.2017', 408870, 1129, '0000-00-00', '', '0000-00-00', ''),
(131, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Electrical Engg.', 18, '15.09.2017', 817740, 1130, '0000-00-00', '', '0000-00-00', ''),
(132, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of ECE', 15, '15.09.2017', 681450, 1131, '0000-00-00', '', '0000-00-00', ''),
(133, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of IST', 20, '15.09.2017', 908600, 1132, '0000-00-00', '', '0000-00-00', ''),
(134, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Printing Tech', 10, '15.09.2017', 454300, 1133, '0000-00-00', '', '0000-00-00', ''),
(135, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Maths', 10, '15.09.2017', 454300, 1134, '0000-00-00', '', '0000-00-00', ''),
(136, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Physics', 8, '15.09.2017', 363440, 1135, '0000-00-00', '', '0000-00-00', ''),
(137, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Chemistry', 8, '15.09.2017', 363440, 1136, '0000-00-00', '', '0000-00-00', ''),
(138, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of MBA', 10, '15.09.2017', 454300, 1137, '0000-00-00', '', '0000-00-00', ''),
(139, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Geology', 6, '15.09.2017', 272580, 1138, '0000-00-00', '', '0000-00-00', ''),
(140, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Media Science', 5, '15.09.2017', 227150, 1139, '0000-00-00', '', '0000-00-00', ''),
(141, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Manufacturing', 8, '15.09.2017', 363440, 1140, '0000-00-00', '', '0000-00-00', ''),
(142, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Medical Physics', 8, '15.09.2017', 363440, 1141, '0000-00-00', '', '0000-00-00', ''),
(143, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Mech. Engineering', 18, '15.09.2017', 817740, 1142, '0000-00-00', '', '0000-00-00', ''),
(144, 2017, 'Desktop', 'Desktop Computer i7', 'Planning and Development', 5, '15.09.2017', 227150, 1143, '0000-00-00', '', '0000-00-00', ''),
(145, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Chemical', 3, '15.09.2017', 167311, 1144, '0000-00-00', '', '0000-00-00', ''),
(146, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Chemical', 1, '15.09.2017', 54994, 1145, '0000-00-00', '', '0000-00-00', ''),
(147, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Ceramic Tech', 3, '15.09.2017', 160425, 1146, '0000-00-00', '', '0000-00-00', ''),
(148, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Applied Science Tech', 3, '15.09.2017', 160425, 1147, '0000-00-00', '', '0000-00-00', ''),
(149, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Textile Tech', 3, '15.09.2017', 160425, 1148, '0000-00-00', '', '0000-00-00', ''),
(150, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Bio-Technology', 4, '15.09.2017', 213773, 1149, '0000-00-00', '', '0000-00-00', ''),
(151, 2017, 'Desktop', 'Desktop Computer i7', 'Crystal Growth Centre', 3, '15.09.2017', 172057, 1150, '0000-00-00', '', '0000-00-00', ''),
(152, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Nano Science', 3, '15.09.2017', 160425, 1151, '0000-00-00', '', '0000-00-00', ''),
(153, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Leather Tech', 5, '15.09.2017', 278852, 1152, '0000-00-00', '', '0000-00-00', ''),
(154, 2017, 'Desktop', 'Desktop Computer i7', 'Computer Lab', 50, '15.09.2017', 2788517, 1153, '0000-00-00', '', '0000-00-00', ''),
(155, 2017, 'Desktop', 'Desktop Computer i7', 'Computer Centre (Computer Practice Lab)', 75, '15.09.2017', 3601154, 1154, '0000-00-00', '', '0000-00-00', ''),
(156, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Computer Tech', 6, '15.09.2017', 288092, 1155, '0000-00-00', '', '0000-00-00', ''),
(157, 2017, 'Desktop', 'Desktop Computer i7', 'Computer Centre (CAD Lab)', 30, '15.09.2017', 466465, 1156, '0000-00-00', '', '0000-00-00', ''),
(158, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of IT', 12, '15.09.2017', 659927, 1157, '0000-00-00', '', '0000-00-00', ''),
(159, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of ECE', 18, '15.09.2017', 989890, 1158, '0000-00-00', '', '0000-00-00', ''),
(160, 2017, 'Desktop', 'Desktop Computer i7', 'Head DIST CEG Campus', 3, '28.09.2017', 176614, 1159, '0000-00-00', '', '0000-00-00', ''),
(161, 2017, 'Desktop', 'Desktop Computer i7', 'Head CTDT', 7, '28.09.2017', 412100, 1160, '0000-00-00', '', '0000-00-00', ''),
(162, 2017, 'Desktop', 'Desktop Computer i7', 'Controller of Examinations', 3, '28.09.2017', 176614, 1161, '0000-00-00', '', '0000-00-00', ''),
(163, 2017, 'Desktop', 'Desktop Computer i7', 'Controller of Examinations', 6, '28.09.2017', 353228, 1162, '0000-00-00', '', '0000-00-00', ''),
(164, 2017, 'Desktop', 'Desktop Computer i7', 'Head ECE', 40, '28.09.2017', 1817200, 1163, '0000-00-00', '', '0000-00-00', ''),
(165, 2017, 'Desktop', 'Desktop Computer i7', 'Director IRS', 10, '28.09.2017', 534434, 1164, '0000-00-00', '', '0000-00-00', ''),
(166, 2017, 'Desktop', 'Desktop Computer i7', 'Head DIST', 6, '28.09.2017', 329963, 1165, '0000-00-00', '', '0000-00-00', ''),
(167, 2017, 'Desktop', 'Desktop Computer i7', 'Head EE MIT', 50, '28.09.2017', 2465374, 1166, '0000-00-00', '', '0000-00-00', ''),
(168, 2017, 'Desktop', 'Desktop Computer i7', 'Director RCC', 10, '28.09.2017', 534434, 1167, '0000-00-00', '', '0000-00-00', ''),
(169, 2017, 'Desktop', 'Desktop Computer i7', 'Director KDC', 6, '28.09.2017', 295845, 1168, '0000-00-00', '', '0000-00-00', ''),
(170, 2017, 'Desktop', 'Desktop Computer i7', 'Director Centre for Nano Science & Tech', 6, '28.09.2017', 295845, 1169, '0000-00-00', '', '0000-00-00', ''),
(171, 2017, 'Desktop', 'Desktop Computer i7', 'ACOE', 8, '28.09.2017', 470971, 1170, '0000-00-00', '', '0000-00-00', ''),
(172, 2017, 'Desktop', 'Desktop Computer i7', 'Head ECE', 1, '28.09.2017', 58871, 1171, '0000-00-00', '', '0000-00-00', ''),
(173, 2017, 'Desktop', 'Desktop Computer i7', 'Prof. and Head CT MIT', 2, '28.09.2017', 117743, 1172, '0000-00-00', '', '0000-00-00', ''),
(174, 2017, 'Desktop', 'Desktop Computer i7', 'Prof. and Head IT MIT', 10, '28.09.2017', 493075, 1173, '0000-00-00', '', '0000-00-00', ''),
(175, 2017, 'Desktop', 'Desktop Computer i7', 'Prof. and Head EEE', 2, '28.09.2017', 109988, 1174, '0000-00-00', '', '0000-00-00', ''),
(176, 2017, 'Desktop', 'Desktop Computer i7', 'Director CWR', 4, '28.09.2017', 197230, 1175, '0000-00-00', '', '0000-00-00', ''),
(177, 2017, 'Desktop', 'Desktop Computer i7', 'Director CWR', 3, '28.09.2017', 147922, 1176, '0000-00-00', '', '0000-00-00', ''),
(178, 2017, 'Desktop', 'Desktop Computer i7', 'Head DECE', 2, '28.09.2017', 117743, 1177, '0000-00-00', '', '0000-00-00', ''),
(179, 2017, 'Desktop', 'Desktop Computer i5', 'Head Chemistry AU', 25, '16.11.2017', 1003000, 1178, '0000-00-00', '', '0000-00-00', ''),
(180, 2018, 'Desktop', 'Desktop Computer i7', 'PRO\'s Office Rajbhavan', 3, '10.01.2018', 204997, 1179, '0000-00-00', '', '0000-00-00', ''),
(181, 2018, 'Desktop', 'Desktop Computer i7', 'Director IQAC', 1, '10.01.2018', 56050, 1180, '0000-00-00', '', '0000-00-00', ''),
(182, 2018, 'Desktop', 'Desktop Computer i7', 'Director Recruitment Cell', 2, '25.01.2018', 126282, 1181, '0000-00-00', '', '0000-00-00', ''),
(183, 2018, 'Desktop', 'Desktop Computer i5', 'Director Inst. Of Remote Sensing', 6, '22.03.2018', 253464, 1182, '0000-00-00', '', '0000-00-00', ''),
(184, 2018, 'Desktop', 'Desktop Computer i5', 'Dean UCE Konam Nagarkoil', 1, '22.03.2018', 42244, 1183, '0000-00-00', '', '0000-00-00', ''),
(185, 2018, 'Desktop', 'Desktop Computer i5', 'Director Library CEG Campus', 10, '22.03.2018', 422440, 1184, '0000-00-00', '', '0000-00-00', ''),
(186, 2018, 'Desktop', 'Desktop Computer i3', 'Dean BIT Campus Trichy', 70, '28.03.2018', 1858500, 1185, '0000-00-00', '', '0000-00-00', ''),
(187, 2018, 'Desktop', 'Desktop Computer i5', 'Dean UCE Kanchipuram', 200, '05.04.2018', 5734800, 1186, '0000-00-00', '', '0000-00-00', ''),
(188, 2018, 'Desktop', 'Desktop Computer i5', 'Dean UCE Ariyalur', 300, '05.04.2018', 8602800, 1187, '0000-00-00', '', '0000-00-00', ''),
(189, 2018, 'Desktop', 'Desktop Computer i5', 'Dean AU Regional Campus Madurai', 100, '05.04.2018', 2867400, 1188, '0000-00-00', '', '0000-00-00', ''),
(190, 2018, 'Desktop', 'Desktop Computer i5', 'Director CUIC CEG Campus', 40, '05.04.2018', 1146960, 1189, '0000-00-00', '', '0000-00-00', ''),
(191, 2018, 'Desktop', 'Desktop Computer i5', 'Head Mechancial Engg.', 5, '05.04.2018', 143370, 1190, '0000-00-00', '', '0000-00-00', ''),
(192, 2018, 'Desktop', 'Desktop Computer i5', 'Head EEE CEG Campus', 5, '05.04.2018', 143370, 1191, '0000-00-00', '', '0000-00-00', ''),
(193, 2018, 'Desktop', 'Desktop Computer i5', 'Head EEE CEG Campus', 7, '05.04.2018', 200718, 1192, '0000-00-00', '', '0000-00-00', ''),
(194, 2018, 'Desktop', 'Desktop Computer i5', 'Director CDE CEG Campus', 10, '05.04.2018', 286740, 1193, '0000-00-00', '', '0000-00-00', ''),
(195, 2018, 'Desktop', 'Desktop Computer i5', 'Co-ordinator UPE CEG Campus', 2, '05.04.2018', 57348, 1194, '0000-00-00', '', '0000-00-00', ''),
(196, 2018, 'Desktop', 'Desktop Computer i5', 'Head Mechancial Engg.', 20, '05.04.2018', 573480, 1195, '0000-00-00', '', '0000-00-00', ''),
(197, 2018, 'Desktop', 'Desktop Computer i5', 'Head Industrial Engg. CEG Campus', 10, '05.04.2018', 286740, 1196, '0000-00-00', '', '0000-00-00', ''),
(198, 2018, 'Desktop', 'Desktop Computer i5', 'Dean UCE Villupuram', 60, '05.04.2018', 1720440, 1197, '0000-00-00', '', '0000-00-00', ''),
(199, 2018, 'Desktop', 'Desktop Computer i5', 'Head Industrial Engg. CEG Campus', 2, '05.04.2018', 57348, 1198, '0000-00-00', '', '0000-00-00', ''),
(200, 2018, 'Desktop', 'Desktop Computer i5', 'Co-ordinator App. Sci. & Hum. MIT Campus', 3, '05.04.2018', 86022, 1199, '0000-00-00', '', '0000-00-00', ''),
(201, 2018, 'Desktop', 'Desktop Computer i5', 'Director CAI AU', 6, '05.04.2018', 172044, 1200, '0000-00-00', '', '0000-00-00', ''),
(202, 2018, 'Desktop', 'Desktop Computer i5', 'Dean SAP Campus', 6, '19.04.2018', 172044, 1201, '0000-00-00', '', '0000-00-00', ''),
(203, 2018, 'Desktop', 'Desktop Computer i5', 'Head Medical Physics', 2, '19.04.2018', 57348, 1202, '0000-00-00', '', '0000-00-00', ''),
(204, 2018, 'Desktop', 'Desktop Computer i7', 'Head DIST CEG Campus', 10, '21.05.2018', 668647, 1203, '0000-00-00', '', '0000-00-00', ''),
(205, 2018, 'Desktop', 'Desktop Computer i7', 'Head DCSE CEG Campus', 90, '21.07.2018', 5240970, 1204, '0000-00-00', '', '0000-00-00', ''),
(206, 2018, 'Desktop', 'Desktop Computer i7', 'Director P&D', 26, '21.07.2018', 1388270, 1205, '0000-00-00', '', '0000-00-00', ''),
(207, 2018, 'Desktop', 'Desktop Computer i7', 'Head Dept. Instrumentation Engg. MIT Campus', 10, '21.07.2018', 533950, 1206, '0000-00-00', '', '0000-00-00', ''),
(208, 2018, 'Desktop', 'Desktop Computer i7', 'Director Library CEG Campus', 5, '21.07.2018', 266975, 1207, '0000-00-00', '', '0000-00-00', ''),
(209, 2018, 'Desktop', 'Desktop Computer i7', 'Head Dept. Mechancial Engg. CEG Campus', 5, '21.07.2018', 266975, 1208, '0000-00-00', '', '0000-00-00', ''),
(210, 2018, 'Desktop', 'Desktop Computer i7', 'Director Academic Courses', 3, '21.07.2018', 160185, 1209, '0000-00-00', '', '0000-00-00', ''),
(211, 2018, 'Desktop', 'Desktop Computer i7', 'Controller of Examinations AU', 1, '21.07.2018', 53395, 1210, '0000-00-00', '', '0000-00-00', ''),
(1, 2014, 'Server', 'Server', 'Head CT MIT', 2, '31.12.2014', 119654, 1211, '0000-00-00', '', '0000-00-00', ''),
(2, 2014, 'Server', 'Server', 'Dean CEG', 1, '31.12.2014', 264760, 1212, '0000-00-00', '', '0000-00-00', ''),
(3, 2014, 'Server', 'Server', 'EEE CEG', 1, '31.12.2014', 140108, 1213, '0000-00-00', '', '0000-00-00', ''),
(4, 2015, 'Server', 'Server', 'Chemical Engineering', 2, '05.02.2015', 440268, 1214, '0000-00-00', '', '0000-00-00', ''),
(5, 2015, 'Server', 'Server', 'RCC', 1, '26.02.2015', 1350000, 1215, '0000-00-00', '', '0000-00-00', ''),
(6, 2015, 'Server', 'Server', 'IT MIT Campus', 1, '26.02.2015', 1350000, 1216, '0000-00-00', '', '0000-00-00', ''),
(7, 2015, 'Server', 'Server', 'IT MIT Campus', 1, '26.02.2015', 345000, 1217, '0000-00-00', '', '0000-00-00', ''),
(8, 2015, 'Server', 'Server', 'CT MIT Campus', 1, '26.02.2015', 345000, 1218, '0000-00-00', '', '0000-00-00', ''),
(9, 2015, 'Server', 'Server', 'Centre for Research', 1, '26.02.2015', 345000, 1219, '0000-00-00', '', '0000-00-00', ''),
(10, 2015, 'Server', 'Server', 'Dean MIT Campus', 1, '26.02.2015', 345000, 1220, '0000-00-00', '', '0000-00-00', ''),
(11, 2015, 'Server', 'Server', 'Computer Centre MIT Campus', 1, '26.02.2015', 345000, 1221, '0000-00-00', '', '0000-00-00', ''),
(12, 2015, 'Server', 'Blade Server', 'CSE CEG Campus', 4, '26.02.2015', 1998000, 1222, '0000-00-00', '', '0000-00-00', ''),
(13, 2015, 'Server', 'Blade Server', 'IT CEG Campus', 4, '26.02.2015', 1998000, 1223, '0000-00-00', '', '0000-00-00', ''),
(14, 2015, 'Server', 'Server', 'Knowledge Data Centre AU', 2, '09.03.2015', 2700000, 1224, '0000-00-00', '', '0000-00-00', ''),
(15, 2015, 'Server', 'Server', 'CSE CEG Campus', 2, '09.03.2015', 690000, 1225, '0000-00-00', '', '0000-00-00', ''),
(16, 2015, 'Server', 'Server', 'IT CEG Campus', 2, '09.03.2015', 690000, 1226, '0000-00-00', '', '0000-00-00', ''),
(17, 2015, 'Server', 'High End Server', 'Controller of Examinations AU', 4, '12.03.2015', 7854661, 1227, '0000-00-00', '', '0000-00-00', ''),
(18, 2015, 'Server', 'High End Server', 'Secretary TANCET Exams. Centre', 1, '23.03.2015', 1963665, 1228, '0000-00-00', '', '0000-00-00', ''),
(19, 2015, 'Server', 'High End Server', 'Secretary TNEA Exams. Centre', 1, '23.03.2015', 1963665, 1229, '0000-00-00', '', '0000-00-00', ''),
(20, 2015, 'Server', 'High End Server', 'Director KDC AU ', 2, '23.03.2015', 392733, 1230, '0000-00-00', '', '0000-00-00', ''),
(21, 2015, 'Server', 'Server', 'Co-ordinator NSS', 1, '27.07.2015', 251522, 1231, '0000-00-00', '', '0000-00-00', ''),
(22, 2015, 'Server', 'Server', 'Director Academic Courses', 1, '01.10.2015', 440000, 1232, '0000-00-00', '', '0000-00-00', ''),
(23, 2015, 'Server', 'Server', 'Director Recruitment Cell', 1, '12.10.2015', 440000, 1233, '0000-00-00', '', '0000-00-00', ''),
(24, 2015, 'Server', 'Server', 'Prof. & Head MBA', 1, '06.11.2015', 197225, 1234, '0000-00-00', '', '0000-00-00', ''),
(25, 2016, 'Server', ' Server', 'Head CSE CEG Campus', 1, '03.03.2016', 59000, 1235, '0000-00-00', '', '0000-00-00', ''),
(26, 2016, 'Server', ' Server', 'DCSE CEG Campus', 1, '21.03.2016', 189000, 1236, '0000-00-00', '', '0000-00-00', ''),
(27, 2016, 'Server', 'Server', 'Head Mining Depart', 1, '21.03.2016', 189000, 1237, '0000-00-00', '', '0000-00-00', ''),
(28, 2016, 'Server', ' Server', 'Head ECE CEG Campus', 2, '03.03.2016', 378000, 1238, '0000-00-00', '', '0000-00-00', ''),
(29, 2016, 'Server', 'Rack Server', 'Director RCC', 1, '17.06.2016', 440000, 1239, '0000-00-00', '', '0000-00-00', ''),
(30, 2017, 'Server', 'Server', 'Head DIST CEG Campus', 1, '30.01.2017', 182700, 1240, '0000-00-00', '', '0000-00-00', ''),
(31, 2017, 'Server', 'Server', 'Dean SAP Campus', 1, '30.01.2017', 175350, 1241, '0000-00-00', '', '0000-00-00', ''),
(32, 2017, 'Server', 'Server', 'Director RCC', 1, '07.03.2017', 354000, 1242, '0000-00-00', '', '0000-00-00', ''),
(33, 2017, 'Server', 'Server', 'Head CWDiv. Mechanical Engg.', 1, '07.03.2017', 152250, 1243, '0000-00-00', '', '0000-00-00', ''),
(34, 2017, 'Server', 'Low End Server', 'Head CSE CEG Campus', 4, '05.06.2017', 283500, 1244, '0000-00-00', '', '0000-00-00', ''),
(35, 2017, 'Server', 'Server', 'Head Chemistry', 1, '05.06.2017', 231000, 1245, '0000-00-00', '', '0000-00-00', ''),
(36, 2017, 'Server', 'High End Server', 'Head CSE CEG Campus', 1, '19.07.2017', 485000, 1246, '0000-00-00', '', '0000-00-00', ''),
(37, 2017, 'Server', 'High End Server', 'Director RCC', 1, '20.07.2017', 955000, 1247, '0000-00-00', '', '0000-00-00', ''),
(38, 2017, 'Server', 'High End Server', 'Secretary TNEA Exams. Centre', 1, '20.07.2017', 955000, 1248, '0000-00-00', '', '0000-00-00', ''),
(39, 2017, 'Server', 'Server', 'Secretary TNEA Exams. Centre', 1, '24.08.2017', 849600, 1249, '0000-00-00', '', '0000-00-00', ''),
(40, 2017, 'Server', 'Server', 'Director P&D', 1, '15.09.2017', 213811, 1250, '0000-00-00', '', '0000-00-00', ''),
(41, 2017, 'Server', 'Server', 'Head DCSE CEG', 2, '15.09.2017', 804819, 1251, '0000-00-00', '', '0000-00-00', ''),
(42, 2017, 'Server', 'Server', 'Director RCC', 1, '15.09.2017', 867349, 1252, '0000-00-00', '', '0000-00-00', ''),
(43, 2017, 'Server', 'Server', 'Director KDC', 1, '15.09.2017', 768510, 1253, '0000-00-00', '', '0000-00-00', ''),
(44, 2017, 'Server', 'High End Server', 'Director CTDT', 1, '05.10.2017', 919999, 1254, '0000-00-00', '', '0000-00-00', ''),
(45, 2017, 'Server', 'HPC Server', 'Head Aerospace Research MIT', 1, '05.10.2017', 700000, 1255, '0000-00-00', '', '0000-00-00', ''),
(46, 2017, 'Server', 'High End Server', 'Head DCSE CEG', 1, '28.12.2017', 974000, 1256, '0000-00-00', '', '0000-00-00', ''),
(47, 2018, 'Server', 'High End Server', 'Director RCC', 1, '12.01.2018', 974000, 1257, '0000-00-00', '', '0000-00-00', ''),
(48, 2018, 'Server', 'Server', 'Head Media Science', 1, '19.01.2018', 325000, 1258, '0000-00-00', '', '0000-00-00', ''),
(49, 2018, 'Server', 'Server', 'Dean UCE Dindugul', 1, '28.02.2018', 64000, 1259, '0000-00-00', '', '0000-00-00', ''),
(50, 2018, 'Server', 'Server', 'Co-ordinator UPE CEG Campus', 1, '21.03.2018', 183750, 1260, '0000-00-00', '', '0000-00-00', ''),
(51, 2018, 'Server', 'Server', 'ACOE CEG Campus', 2, '28.03.2018', 1355962, 1261, '0000-00-00', '', '0000-00-00', ''),
(52, 2018, 'Server', 'Server', 'Director KDC CEG Campus', 4, '07.06.2018', 2596000, 1262, '0000-00-00', '', '0000-00-00', ''),
(53, 2018, 'Server', 'High End Server', 'Co-ordinator UPE CEG Campus', 1, '07.06.2018', 417375, 1263, '0000-00-00', '', '0000-00-00', ''),
(1, 2014, 'Workstation', 'Work Station', 'Aerospace Research', 1, '29.09.2014', 242802, 1264, '0000-00-00', '', '0000-00-00', ''),
(2, 2014, 'Workstation', 'Work Station', 'AU-KBC Centre MIT', 1, '29.09.2014', 139585, 1265, '0000-00-00', '', '0000-00-00', ''),
(3, 2014, 'Workstation', 'Work Station', 'Head Computer Tech. CEG Campus', 2, '24.12.2014', 125952, 1266, '0000-00-00', '', '0000-00-00', ''),
(4, 2014, 'Workstation', 'Work Station', 'Biotechnology', 1, '31.12.2014', 199500, 1267, '0000-00-00', '', '0000-00-00', ''),
(5, 2015, 'Workstation', 'Work Station', 'ACOE ', 1, '11.02.2015', 358624, 1268, '0000-00-00', '', '0000-00-00', ''),
(6, 2015, 'Workstation', 'Work Station', 'CSE CEG Campus', 5, '26.02.2015', 700000, 1269, '0000-00-00', '', '0000-00-00', ''),
(7, 2015, 'Workstation', 'Work Station', 'Exams. Centre TNEA', 4, '11.03.2015', 560000, 1270, '0000-00-00', '', '0000-00-00', ''),
(8, 2015, 'Workstation', 'Work Station', 'Centre for Biotechnolgy A.C.Tech.', 1, '25.05.2015', 333500, 1271, '0000-00-00', '', '0000-00-00', ''),
(9, 2015, 'Workstation', 'Work Station', 'Head Electronics Engg. MIT Campus', 1, '06.11.2015', 207900, 1272, '0000-00-00', '', '0000-00-00', ''),
(10, 2015, 'Workstation', 'Work Station', 'Director EMRC CEG Campus', 2, '06.11.2015', 185000, 1273, '0000-00-00', '', '0000-00-00', ''),
(11, 2015, 'Workstation', 'Work Station', 'Head Mechancial Engg. CEG Campus', 1, '22.12.2015', 93114, 1274, '0000-00-00', '', '0000-00-00', ''),
(12, 2016, 'Workstation', 'Work Station', 'Director AU-FRG HP 1.3', 2, '25.02.2016', 265125, 1275, '0000-00-00', '', '0000-00-00', ''),
(13, 2016, 'Workstation', 'Work Station', 'Director AU-FRG HP 1.4', 1, '25.02.2016', 171917, 1276, '0000-00-00', '', '0000-00-00', ''),
(14, 2017, 'Workstation', 'Work Station', 'Director AU-FRG ', 2, '30.01.2017', 174300, 1277, '0000-00-00', '', '0000-00-00', ''),
(15, 2017, 'Workstation', 'Work Station', 'Director AU-FRG ', 1, '30.01.2017', 109200, 1278, '0000-00-00', '', '0000-00-00', ''),
(16, 2017, 'Workstation', 'Work Station', 'Director AU-FRG ', 2, '30.01.2017', 163800, 1279, '0000-00-00', '', '0000-00-00', ''),
(17, 2017, 'Workstation', 'Work Station', 'Head Physics', 1, '13.02.2017', 169050, 1280, '0000-00-00', '', '0000-00-00', ''),
(18, 2017, 'Workstation', 'Work Station', 'Head Physics', 1, '16.02.2017', 138600, 1281, '0000-00-00', '', '0000-00-00', ''),
(19, 2017, 'Workstation', 'Work Station', 'Director RCC', 1, '24.02.2017', 210000, 1282, '0000-00-00', '', '0000-00-00', ''),
(20, 2017, 'Workstation', 'Work Station', 'Head Physics', 1, '20.07.2017', 430500, 1283, '0000-00-00', '', '0000-00-00', ''),
(21, 2017, 'Workstation', 'Work Station', 'Dean CEG', 3, '24.08.2017', 559544, 1284, '0000-00-00', '', '0000-00-00', ''),
(22, 2017, 'Workstation', 'Work Station', 'Prof. and Head Medical Physics', 1, '21.11.2017', 321788, 1285, '0000-00-00', '', '0000-00-00', ''),
(23, 2017, 'Workstation', 'Work Station', 'Director CCC&AR', 3, '28.12.2017', 573480, 1286, '0000-00-00', '', '0000-00-00', ''),
(24, 2018, 'Workstation', 'Workstation', 'Head DIST CEG Campus', 1, '03.01.2018', 108560, 1287, '0000-00-00', '', '0000-00-00', ''),
(25, 2018, 'Workstation', 'Workstation', 'Head Aerospace Engg. MIT Campus', 1, '20.02.2018', 205000, 1288, '0000-00-00', '', '0000-00-00', ''),
(26, 2018, 'Workstation', 'Workstation', 'Head Computer Tech. MIT Campus', 3, '10.03.2018', 350000, 1289, '0000-00-00', '', '0000-00-00', ''),
(27, 2018, 'Workstation', 'Workstation', 'Head Manufacturing Engg.', 2, '22.03.2018', 233333, 1290, '0000-00-00', '', '0000-00-00', ''),
(28, 2018, 'Workstation', 'Workstation', 'Director AU-FRG CEG Campus', 12, '07.06.2018', 891372, 1291, '0000-00-00', '', '0000-00-00', ''),
(29, 2018, 'Workstation', 'Workstation', 'Head DIST CEG Campus', 10, '29.06.2018', 849600, 1292, '0000-00-00', '', '0000-00-00', ''),
(1, 2014, 'Laptop', 'Laptop i3', 'Institute of Remote Sensing', 1, '12.09.2014', 35000, 1293, '0000-00-00', '', '0000-00-00', ''),
(2, 2014, 'Laptop', 'Laptop i7', 'Finance Officer', 1, '12.09.2014', 63000, 1294, '0000-00-00', '', '0000-00-00', ''),
(3, 2014, 'Laptop', 'Laptop i7', 'Prof. Syndicate Section', 1, '12.09.2014', 63000, 1295, '0000-00-00', '', '0000-00-00', ''),
(4, 2014, 'Laptop', 'Laptop i7', 'Academic Courses', 3, '12.09.2014', 176255, 1296, '0000-00-00', '', '0000-00-00', ''),
(5, 2014, 'Laptop', 'Laptop i7', 'ACOE', 1, '12.09.2014', 58572, 1297, '0000-00-00', '', '0000-00-00', ''),
(6, 2014, 'Laptop', 'Laptop i7', 'IQAC', 1, '12.09.2014', 58572, 1298, '0000-00-00', '', '0000-00-00', ''),
(7, 2014, 'Laptop', 'Laptop i3', 'Department of ECE', 1, '12.09.2014', 35000, 1299, '0000-00-00', '', '0000-00-00', ''),
(8, 2014, 'Laptop', 'Laptop i3', 'Department of Mech', 9, '23.09.2014', 382096, 1300, '0000-00-00', '', '0000-00-00', ''),
(9, 2014, 'Laptop', 'Laptop i5', 'RCC', 1, '29.09.2014', 69457, 1301, '0000-00-00', '', '0000-00-00', ''),
(10, 2014, 'Laptop', 'Laptop i5', 'CWR', 6, '01.10.2014', 228000, 1302, '0000-00-00', '', '0000-00-00', ''),
(11, 2015, 'Laptop', 'Laptop i5', 'Head IT MIT Campus', 1, '18.02.2015', 38000, 1303, '0000-00-00', '', '0000-00-00', ''),
(12, 2015, 'Laptop', 'Laptop i5', 'Div. Sciences and Humanities', 1, '18.02.2015', 38000, 1304, '0000-00-00', '', '0000-00-00', ''),
(13, 2015, 'Laptop', 'Laptop i5', 'Asst. Prof. Media Science', 1, '03.03.2015', 38000, 1305, '0000-00-00', '', '0000-00-00', ''),
(14, 2015, 'Laptop', 'Laptop MacBook', 'RCC AU', 10, '02.03.2015', 792900, 1306, '0000-00-00', '', '0000-00-00', ''),
(15, 2015, 'Laptop', 'Laptop i7', 'KDC AU', 1, '09.03.2015', 58968, 1307, '0000-00-00', '', '0000-00-00', ''),
(16, 2015, 'Laptop', 'Laptop i7', 'Prof. & Head. Manufacturing', 1, '09.03.2015', 58968, 1308, '0000-00-00', '', '0000-00-00', ''),
(17, 2015, 'Laptop', 'Laptop i7', 'Dean A.C.Tech.', 1, '09.03.2015', 58968, 1309, '0000-00-00', '', '0000-00-00', ''),
(18, 2015, 'Laptop', 'Laptop i5', 'Prof. & Head. CSE', 1, '09.03.2015', 89900, 1310, '0000-00-00', '', '0000-00-00', ''),
(19, 2015, 'Laptop', 'Laptop MacBook', 'Controller of Examination', 1, '12.03.2015', 79290, 1311, '0000-00-00', '', '0000-00-00', ''),
(20, 2015, 'Laptop', 'Laptop i5', 'Head Production Tech.', 1, '27.07.2015', 39000, 1312, '0000-00-00', '', '0000-00-00', ''),
(21, 2015, 'Laptop', 'Laptop i5', 'Controller of Examinations', 2, '27.07.2015', 100000, 1313, '0000-00-00', '', '0000-00-00', ''),
(22, 2015, 'Laptop', 'Laptop i5', 'Electronics Engg. MIT Campus', 2, '27.07.2015', 118500, 1314, '0000-00-00', '', '0000-00-00', ''),
(23, 2015, 'Laptop', 'Laptop i5', 'Mechancial Engg CEG Campus', 1, '27.07.2015', 59250, 1315, '0000-00-00', '', '0000-00-00', ''),
(24, 2015, 'Laptop', 'Laptop i5', 'Head ISTCEG Campus', 1, '10.08.2015', 59250, 1316, '0000-00-00', '', '0000-00-00', ''),
(25, 2015, 'Laptop', 'Laptop i5', 'Prof. & Head Textile Tech.', 2, '10.08.2015', 100000, 1317, '0000-00-00', '', '0000-00-00', ''),
(26, 2015, 'Laptop', 'Apple Macbook', 'Director CTDT', 1, '06.11.2015', 118700, 1318, '0000-00-00', '', '0000-00-00', ''),
(27, 2015, 'Laptop', 'Laptop i5', 'Head Printing Technology', 2, '22.12.2015', 102900, 1319, '0000-00-00', '', '0000-00-00', ''),
(28, 2015, 'Laptop', 'Laptop i7', 'Director Academic Courses', 4, '22.12.2015', 249900, 1320, '0000-00-00', '', '0000-00-00', ''),
(29, 2015, 'Laptop', 'Laptop i7', 'Director P & D', 1, '22.12.2015', 62475, 1321, '0000-00-00', '', '0000-00-00', ''),
(30, 2015, 'Laptop', 'Laptop i7', 'Co-ordinator Science & Hum. MIT', 1, '22.12.2015', 62475, 1322, '0000-00-00', '', '0000-00-00', ''),
(31, 2015, 'Laptop', 'Laptop i3', 'Head NHHID AU', 2, '31.12.2015', 53600, 1323, '0000-00-00', '', '0000-00-00', ''),
(32, 2015, 'Laptop', 'Laptop i3', 'Head Medical Physics', 1, '31.12.2015', 26800, 1324, '0000-00-00', '', '0000-00-00', ''),
(33, 2015, 'Laptop', 'Laptop i3', 'Head Biotech. A.C.Tech.', 2, '31.12.2015', 53600, 1325, '0000-00-00', '', '0000-00-00', ''),
(34, 2015, 'Laptop', 'Laptop i3', 'Director Library CEG Campus', 1, '31.12.2015', 26800, 1326, '0000-00-00', '', '0000-00-00', ''),
(35, 2015, 'Laptop', 'Laptop i5', 'Head Biotech. A.C.Tech.', 3, '31.12.2015', 119775, 1327, '0000-00-00', '', '0000-00-00', ''),
(36, 2015, 'Laptop', 'Laptop i5', 'Director Library CEG Campus', 1, '31.12.2015', 39925, 1328, '0000-00-00', '', '0000-00-00', ''),
(37, 2016, 'Laptop', 'Laptop i3', 'Head CWR CEG Campus', 1, '14.01.2016', 26800, 1329, '0000-00-00', '', '0000-00-00', ''),
(38, 2016, 'Laptop', 'Laptop i3', 'Head Chemical Engg. A.C.Tech', 7, '17.02.2016', 210000, 1330, '0000-00-00', '', '0000-00-00', ''),
(39, 2016, 'Laptop', 'Laptop i5', 'Head Biotech. A.C.Tech.', 3, '02.03.2016', 119613, 1331, '0000-00-00', '', '0000-00-00', ''),
(40, 2016, 'Laptop', 'Laptop i5', 'Head NHHID AU', 1, '02.03.2016', 39871, 1332, '0000-00-00', '', '0000-00-00', ''),
(41, 2016, 'Laptop', 'Laptop i5', 'Head English', 1, '02.03.2016', 39871, 1333, '0000-00-00', '', '0000-00-00', ''),
(42, 2016, 'Laptop', 'Laptop i5', 'Head Electronics Engg. MIT', 5, '03.03.2016', 249000, 1334, '0000-00-00', '', '0000-00-00', ''),
(43, 2016, 'Laptop', 'Laptop i3', 'Dean SAP Campus', 2, '03.03.2016', 91770, 1335, '0000-00-00', '', '0000-00-00', ''),
(44, 2016, 'Laptop', 'Laptopi5', 'Head CSE', 1, '03.03.2016', 51450, 1336, '0000-00-00', '', '0000-00-00', ''),
(45, 2016, 'Laptop', 'Laptop i7', 'Dean CEG AU', 2, '03.03.2016', 124950, 1337, '0000-00-00', '', '0000-00-00', ''),
(46, 2016, 'Laptop', 'Laptop i7', 'IOM CEG ', 1, '03.03.2016', 62475, 1338, '0000-00-00', '', '0000-00-00', ''),
(47, 2017, 'Laptop', 'i5 Laptop', 'Division of Central Workshop', 1, '06.01.2017', 40682, 1339, '0000-00-00', '', '0000-00-00', ''),
(48, 2017, 'Laptop', 'i5 Laptop', 'IOM CEG ', 2, '06.01.2017', 81365, 1340, '0000-00-00', '', '0000-00-00', ''),
(49, 2017, 'Laptop', 'Laptop i7', 'Dierctor Nano Science & Tech', 4, '06.01.2017', 216300, 1341, '0000-00-00', '', '0000-00-00', ''),
(50, 2017, 'Laptop', 'Laptop i7', 'Head Automobile Engg. MIT', 1, '30.01.2017', 79275, 1342, '0000-00-00', '', '0000-00-00', ''),
(51, 2017, 'Laptop', 'Laptop i7', 'Director IQAC ', 1, '30.01.2017', 56700, 1343, '0000-00-00', '', '0000-00-00', ''),
(52, 2017, 'Laptop', 'Laptop i7', 'Director IOM', 1, '30.01.2017', 56700, 1344, '0000-00-00', '', '0000-00-00', ''),
(53, 2017, 'Laptop', 'MacBook Pro Laptop ', 'Director P & D', 1, '16.02.2017', 140000, 1345, '0000-00-00', '', '0000-00-00', ''),
(54, 2017, 'Laptop', 'Laptop i5', 'Head Electronics Engg. MIT', 5, '24.02.2017', 220000, 1346, '0000-00-00', '', '0000-00-00', ''),
(55, 2017, 'Laptop', 'Laptop i7', 'Dean CEG Campus', 4, '25.05.2017', 231000, 1347, '0000-00-00', '', '0000-00-00', ''),
(56, 2017, 'Laptop', 'MacBook Pro Laptop ', 'Director EMRC', 1, '05.06.2017', 203000, 1348, '0000-00-00', '', '0000-00-00', ''),
(57, 2017, 'Laptop', 'Laptop i5', 'Head Geology', 1, '22.06.2017', 61000, 1349, '0000-00-00', '', '0000-00-00', ''),
(58, 2017, 'Laptop', 'Apple Laptop', 'Head Physics', 1, '10.08.2017', 116500, 1350, '0000-00-00', '', '0000-00-00', ''),
(59, 2017, 'Laptop', 'Laptop i3', 'Head English', 3, '11.09.2017', 103546, 1351, '0000-00-00', '', '0000-00-00', ''),
(60, 2017, 'Laptop', 'Laptop i5', 'Head ECE CEG Campus', 1, '11.09.2017', 48000, 1352, '0000-00-00', '', '0000-00-00', ''),
(61, 2017, 'Laptop', 'Laptop i7', 'Head DIST CEG Campus', 8, '26.09.2017', 388928, 1353, '0000-00-00', '', '0000-00-00', ''),
(62, 2017, 'Laptop', 'Laptop i5', 'Head Geology', 1, '27.09.2017', 48616, 1354, '0000-00-00', '', '0000-00-00', ''),
(63, 2017, 'Laptop', 'Laptop i7', 'Dean AC Tech', 2, '27.09.2017', 119770, 1355, '0000-00-00', '', '0000-00-00', ''),
(64, 2017, 'Laptop', 'Laptop i7', 'Head Geology', 1, '27.09.2017', 48616, 1356, '0000-00-00', '', '0000-00-00', ''),
(65, 2017, 'Laptop', 'Apple Macbook ', 'Dean A.C.Tech.', 3, '05.10.2017', 508500, 1357, '0000-00-00', '', '0000-00-00', ''),
(66, 2017, 'Laptop', 'Laptop i7', 'Head Aerospace Research MIT', 2, '10.10.2017', 97232, 1358, '0000-00-00', '', '0000-00-00', ''),
(67, 2017, 'Laptop', 'Laptop i7', 'Head Sciences & Humanities MIT', 2, '10.10.2017', 97232, 1359, '0000-00-00', '', '0000-00-00', ''),
(68, 2017, 'Laptop', 'Laptop i7', 'Dean A.C.Tech.', 2, '13.10.2017', 132000, 1360, '0000-00-00', '', '0000-00-00', ''),
(69, 2018, 'Laptop', 'Laptop i7', 'Director IQAC', 1, '10.01.2018', 56000, 1361, '0000-00-00', '', '0000-00-00', ''),
(70, 2018, 'Laptop', 'Laptop i7', 'Director Academic Courses', 1, '25.01.2018', 56000, 1362, '0000-00-00', '', '0000-00-00', ''),
(71, 2018, 'Laptop', 'Laptop i7', 'Director Academic Courses', 1, '25.01.2018', 56000, 1363, '0000-00-00', '', '0000-00-00', ''),
(72, 2018, 'Laptop', 'MacBook i7 Laptop', 'Head DIST CEG Campus', 1, '28.02.2018', 200000, 1364, '0000-00-00', '', '0000-00-00', ''),
(73, 2018, 'Laptop', 'Laptop i3', 'Director Biotechnology', 3, '21.03.2018', 94164, 1365, '0000-00-00', '', '0000-00-00', ''),
(74, 2018, 'Laptop', 'Laptop i3', 'Head Mechancial Engg.', 6, '21.03.2018', 188328, 1366, '0000-00-00', '', '0000-00-00', ''),
(75, 2018, 'Laptop', 'Laptop i3', 'Director Biotechnology', 3, '21.03.2018', 94164, 1367, '0000-00-00', '', '0000-00-00', ''),
(76, 2018, 'Laptop', 'Laptop i3', 'Head Mechancial Engg.', 6, '21.03.2018', 188328, 1368, '0000-00-00', '', '0000-00-00', ''),
(1, 2014, 'iMac', 'iMac', 'Exam. Centre TNEA', 1, '29.12.2014', 176302, 1369, '0000-00-00', '', '0000-00-00', ''),
(2, 2015, 'iMac', 'iMac', 'Dean MIT', 1, '19.01.2015', 194200, 1370, '0000-00-00', '', '0000-00-00', ''),
(3, 2015, 'iMac', 'iMac', 'Civil Engg. Transportation Div.', 1, '26.02.2015', 74700, 1371, '0000-00-00', '', '0000-00-00', ''),
(4, 2018, 'iMac', 'iMac', 'The Director Centre for International Affairs', 1, '11.07.2018', 169000, 1372, '0000-00-00', '', '0000-00-00', ''),
(5, 2018, 'iMac', 'iMac', 'Director Bio-Technology', 1, '11.07.2018', 169000, 1373, '0000-00-00', '', '0000-00-00', ''),
(6, 2018, 'iMac', 'iMac', 'Head Leather Technology AC Tech', 1, '11.07.2018', 169000, 1374, '0000-00-00', '', '0000-00-00', ''),
(7, 2018, 'iMac', 'iMac', 'Head Leather Technology AC Tech', 1, '24.07.2018', 169000, 1375, '0000-00-00', '', '0000-00-00', '');
-- --------------------------------------------------------
--
-- Table structure for table `system_confi`
--
CREATE TABLE `system_confi` (
`SYS_CONFI_NO` int(5) NOT NULL,
`ITEM_NAME` varchar(60) NOT NULL,
`MAKE` varchar(60) NOT NULL,
`ITEM_CONFI1` varchar(200) NOT NULL,
`ITEM_CONFI2` varchar(60) NOT NULL,
`ITEM_CONFI3` varchar(60) NOT NULL,
`ITEM_CONFI4` varchar(60) NOT NULL,
`ITEM_CONFI5` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `system_confi`
--
INSERT INTO `system_confi` (`SYS_CONFI_NO`, `ITEM_NAME`, `MAKE`, `ITEM_CONFI1`, `ITEM_CONFI2`, `ITEM_CONFI3`, `ITEM_CONFI4`, `ITEM_CONFI5`) VALUES
(3, 'Desktop', 'Dell', 'Operating System: Windows 10 , RAM: 8GB, Processor: Intel Core i7, Hard Drive/SSD: 2TB, Wireless:802.11 n/ac protocols and WPA2 Enterprise', '', '', '', ''),
(4, 'Desktop', 'HP', 'Operating System: Windows 10 , RAM: 8GB, Processor: Intel Core i5, Hard Drive/SSD: 2TB, Wireless:802.11 n/ac protocols and WPA2 Enterprise', '', '', '', ''),
(5, 'Desktop', 'Dell', 'Operating System: Windows 10 , RAM: 8GB, Processor: Intel Core i3, Hard Drive/SSD: 2TB, Wireless:802.11 n/ac protocols and WPA2 Enterprise', '', '', '', ''),
(6, 'Server', 'HP', 'HP ProLiant ML350 Gen9 Server With Intel Xeon E5-2620v3 Processor 8 GB-R, P440ar/2G Storage Controller And 8 Hot-Plug SFF SAS/SATA HDD Bays', '', '', '', '');
-- --------------------------------------------------------
--
-- Table structure for table `table 8`
--
CREATE TABLE `table 8` (
`SL_NO` int(3) DEFAULT NULL,
`PO_YEAR` int(4) DEFAULT NULL,
`ITEM_NAME` varchar(11) DEFAULT NULL,
`ITME_DESCRIPTION` varchar(19) DEFAULT NULL,
`DEPARTMENT` varchar(45) DEFAULT NULL,
`NO_OF_ITEM` int(3) DEFAULT NULL,
`PUR_DATE` varchar(10) DEFAULT NULL,
`AMOUNT` int(7) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `table 8`
--
INSERT INTO `table 8` (`SL_NO`, `PO_YEAR`, `ITEM_NAME`, `ITME_DESCRIPTION`, `DEPARTMENT`, `NO_OF_ITEM`, `PUR_DATE`, `AMOUNT`) VALUES
(1, 2014, 'Desktop', 'Desktop Computer i3', 'Examination Centre', 18, '23.09.2014', 672673),
(2, 2014, 'Desktop', 'Desktop Computer i3', 'CTDT', 3, '23.09.2014', 157278),
(3, 2014, 'Desktop', 'Desktop Computer i3', 'Biotechnolgy UIC', 2, '29.09.2014', 73739),
(4, 2014, 'Desktop', 'Desktop Computer i5', 'CIPR', 5, '29.09.2014', 224755),
(5, 2014, 'Desktop', 'Desktop Computer i5', 'IQAC', 2, '29.09.2014', 89902),
(6, 2014, 'Desktop', 'Desktop Computer i3', 'Computer Technology MIT', 40, '29.12.2014', 1474788),
(7, 2014, 'Desktop', 'Desktop Computer i3', 'Civil Engineering CEG Campus', 5, '29.12.2014', 184349),
(8, 2014, 'Desktop', 'Desktop Computer i3', 'Ref./Ac Division Mech', 4, '29.12.2014', 147479),
(9, 2014, 'Desktop', 'Desktop Computer i3', 'Physics dept. CEG Campus', 2, '29.12.2014', 73739),
(10, 2014, 'Desktop', 'Desktop Computer i3', 'Applied Sci. and Tech. A.C.Tech Cam', 2, '29.12.2014', 73739),
(11, 2014, 'Desktop', 'Desktop Computer i3', 'Industrial Engg. CEG Campus', 6, '29.12.2014', 221218),
(12, 2014, 'Desktop', 'Desktop Computer i5', 'EEE CEG Campus', 7, '29.12.2014', 314656),
(13, 2014, 'Desktop', 'Desktop Computer i5', 'Student Affairs', 6, '29.12.2014', 269706),
(14, 2014, 'Desktop', 'Desktop Computer i5', 'Printing Technology', 5, '29.12.2014', 224755),
(15, 2014, 'Desktop', 'Desktop Computer i5', 'The Library CEG Campus', 2, '29.12.2014', 89902),
(16, 2014, 'Desktop', 'Desktop Computer i5', 'Physics dept. CEG Campus', 1, '29.12.2014', 44951),
(17, 2014, 'Desktop', 'Desktop Computer i7', 'Electronics Engg. MIT Campus', 88, '29.12.2014', 4531296),
(18, 2014, 'Desktop', 'Desktop Computer i7', 'Dean A.C.Tech. ', 20, '29.12.2014', 1029840),
(19, 2014, 'Desktop', 'Desktop Computer i7', 'ECE CEG Campus', 12, '29.12.2014', 617904),
(20, 2014, 'Desktop', 'Desktop Computer i7', 'Computer Tech. MIT Campus', 10, '29.12.2014', 514920),
(21, 2014, 'Desktop', 'Desktop Computer i7', 'Library Main Campus', 6, '29.12.2014', 308952),
(22, 2014, 'Desktop', 'Desktop Computer i7', 'ACOE Main Campus', 5, '29.12.2014', 257460),
(23, 2014, 'Desktop', 'Desktop Computer i7', 'Dean A.C.Tech. ', 5, '29.12.2014', 257460),
(24, 2014, 'Desktop', 'Desktop Computer i7', 'Knowledge Data Centre', 5, '29.12.2014', 257460),
(25, 2014, 'Desktop', 'Desktop Computer i7', 'EEE CEG Campus', 4, '29.12.2014', 205968),
(26, 2014, 'Desktop', 'Desktop Computer i7', 'Printing Tech. CEG Campus', 2, '29.12.2014', 102984),
(27, 2014, 'Desktop', 'Desktop Computer i7', 'Health Centre CEG Campus', 1, '29.12.2014', 51492),
(28, 2015, 'Desktop', 'Desktop Computer i3', 'Mathematics CEG Campus', 35, '02.03.2015', 1035854),
(29, 2015, 'Desktop', 'Desktop Computer i3', 'Mathematics CEG Campus', 2, '02.03.2015', 59192),
(30, 2015, 'Desktop', 'Desktop Computer i7', 'Mathematics CEG Campus', 2, '02.03.2015', 101454),
(31, 2015, 'Desktop', 'Desktop Computer i3', 'Geology CEG Campus', 25, '02.03.2015', 739896),
(32, 2015, 'Desktop', 'Desktop Computer i5', 'CES CEG Campus', 5, '02.03.2015', 199298),
(33, 2015, 'Desktop', 'Desktop Computer i5', 'Dean MIT Campus', 4, '02.03.2015', 159438),
(34, 2015, 'Desktop', 'Desktop Computer i5', 'Media Science CEG Campus', 5, '02.03.2015', 199298),
(35, 2015, 'Desktop', 'Desktop Computer i5', 'Manufacturing Engg CEG Campus', 15, '02.03.2015', 597894),
(36, 2015, 'Desktop', 'Desktop Computer i5', 'Architecture SAP Campus', 4, '02.03.2015', 159438),
(37, 2015, 'Desktop', 'Desktop Computer i5', 'Distance Education CEG Campus', 10, '02.03.2015', 398596),
(38, 2015, 'Desktop', 'Desktop Computer i7', 'Distance Education CEG Campus', 5, '02.03.2015', 253635),
(39, 2015, 'Desktop', 'Desktop Computer i7', 'Sciences and Humanities MIT Campus', 1, '02.03.2015', 50727),
(40, 2015, 'Desktop', 'Desktop Computer i7', 'Co-ordination Section AU', 1, '02.03.2015', 50727),
(41, 2015, 'Desktop', 'Desktop Computer i7', 'IQAC AU', 1, '02.03.2015', 50727),
(42, 2015, 'Desktop', 'Desktop Computer i3', 'Head ECE ', 50, '11.03.2015', 1597917),
(43, 2015, 'Desktop', 'Desktop Computer i5', 'Centre for Research', 10, '11.03.2015', 398596),
(44, 2015, 'Desktop', 'Desktop Computer i5', 'Architecture SAP Campus', 2, '11.03.2015', 79719),
(45, 2015, 'Desktop', 'Desktop Computer i7', 'Registrar Salary Section', 8, '11.03.2015', 405817),
(46, 2015, 'Desktop', 'Desktop Computer i7', 'Registrar AU', 3, '13.03.2015', 152181),
(47, 2015, 'Desktop', 'Desktop Computer i7', 'Centre For CC', 1, '16.03.2015', 50727),
(48, 2015, 'Desktop', 'Desktop Computer i3', 'Director CUIC', 48, '06.10.2015', 1520352),
(49, 2015, 'Desktop', 'Desktop Computer i3', 'Co-ordinator MHRD', 4, '06.10.2015', 126696),
(50, 2015, 'Desktop', 'Desktop Computer i3', 'Head EEE CEG Campus', 3, '06.10.2015', 95022),
(51, 2015, 'Desktop', 'Desktop Computer i3', 'Head Nanoscience and Tech.', 1, '06.10.2015', 31674),
(52, 2015, 'Desktop', 'Desktop Computer i5', 'Prof. Electronics Engg. MIT Campus', 2, '06.10.2015', 78048),
(53, 2015, 'Desktop', 'Desktop Computer i5', 'Director IRS CEG Campus', 6, '06.10.2015', 234144),
(54, 2015, 'Desktop', 'Desktop Computer i5', 'Prof. Textile Tech. A.C.Tech.', 3, '06.10.2015', 117072),
(55, 2015, 'Desktop', 'Desktop Computer i5', 'Health Centre CEG Campus', 2, '06.10.2015', 78048),
(56, 2015, 'Desktop', 'Desktop Computer i7', 'Prof. Mechanical Engg. CEG Campus', 1, '06.10.2015', 50296),
(57, 2015, 'Desktop', 'Desktop Computer i7', 'Director Recruitment Cell', 3, '06.10.2015', 150888),
(58, 2015, 'Desktop', 'Desktop Computer i7', 'Director Crystal Growth Centre', 6, '06.10.2015', 301776),
(59, 2015, 'Desktop', 'Desktop Computer i7', 'RTI Section Au', 1, '06.10.2015', 50296),
(60, 2015, 'Desktop', 'Desktop Computer i7', 'Head CSE', 50, '06.10.2015', 2514800),
(61, 2015, 'Desktop', 'Desktop Computer i7', 'Director EMRC', 3, '06.10.2015', 150888),
(62, 2015, 'Desktop', 'Desktop Computer i5', 'Head Nanoscience and Tech.', 1, '12.10.2015', 39024),
(63, 2015, 'Desktop', 'Desktop Computer i7', 'Head CSE CEG Campus', 10, '06.11.2015', 518700),
(64, 2015, 'Desktop', 'Desktop Computer i7', 'Head Manufacturing Engg', 2, '06.11.2015', 124000),
(65, 2015, 'Desktop', 'Desktop Computer i7', 'Director P&D', 1, '06.11.2015', 62000),
(66, 2015, 'Desktop', 'Desktop Computer i3', 'Head Computer Centre MIT', 16, '22.12.2015', 506784),
(67, 2015, 'Desktop', 'Desktop Computer i3', 'Head Computer Tech. MIT', 3, '22.12.2015', 95022),
(68, 2015, 'Desktop', 'Desktop Computer i3', 'Head Applied Science & Humanities', 1, '22.12.2015', 31674),
(69, 2015, 'Desktop', 'Desktop Computer i5', 'Director Nanoscience and Tech.', 1, '22.12.2015', 39024),
(70, 2015, 'Desktop', 'Desktop Computer i5', 'Head MBA', 10, '22.12.2015', 390240),
(71, 2015, 'Desktop', 'Desktop Computer i5', 'Head MBA', 5, '22.12.2015', 195120),
(72, 2015, 'Desktop', 'Desktop Computer i5', 'Head Aerospace Engineering', 5, '22.12.2015', 195120),
(73, 2015, 'Desktop', 'Desktop Computer i5', 'Head Rubber and Plastics Engg.', 9, '22.12.2015', 351216),
(74, 2015, 'Desktop', 'Desktop Computer i5', 'Head ECE CEG Campus', 3, '22.12.2015', 117072),
(75, 2015, 'Desktop', 'Desktop Computer i5', 'Head Nanoscience and Tech.', 1, '22.12.2015', 39024),
(76, 2015, 'Desktop', 'Desktop Computer i5', 'Co-ordinator Applied Sci. & Hum. MIT', 5, '22.12.2015', 195120),
(77, 2015, 'Desktop', 'Desktop Computer i5', 'Head Applied Science & Technology', 20, '22.12.2015', 780480),
(78, 2015, 'Desktop', 'Desktop Computer i5', 'Dean SAP Campus (Architecture)', 35, '22.12.2015', 1365840),
(79, 2015, 'Desktop', 'Desktop Computer i5', 'Head Printing Technology', 3, '22.12.2015', 117072),
(80, 2015, 'Desktop', 'Desktop Computer i5', 'Director Library CEG Campus', 15, '22.12.2015', 585360),
(81, 2015, 'Desktop', 'Desktop Computer i5', 'Head IT MIT Campus', 1, '22.12.2015', 39024),
(82, 2015, 'Desktop', 'Desktop Computer i5', 'Head Textile Technology', 13, '22.12.2015', 507312),
(83, 2015, 'Desktop', 'Desktop Computer i7', 'Director Crystal Growth Centre', 6, '22.12.2015', 301776),
(84, 2015, 'Desktop', 'Desktop Computer i7', 'Head Nanoscience and Tech.', 1, '22.12.2015', 50296),
(85, 2015, 'Desktop', 'Desktop Computer i7', 'Head CSE CEG Campus', 10, '22.12.2015', 502960),
(86, 2015, 'Desktop', 'Desktop Computer i7', 'Head Applied Science and Tech. A.C.Tech.', 1, '22.12.2015', 50296),
(87, 2015, 'Desktop', 'Desktop Computer i7', 'Head CSE CEG Campus', 59, '22.12.2015', 2967464),
(88, 2015, 'Desktop', 'Desktop Computer i7', 'Head Printing Technology', 5, '22.12.2015', 251480),
(89, 2015, 'Desktop', 'Desktop Computer i7', 'Head Instrumentation Engg. MIT Campus', 23, '22.12.2015', 1156808),
(90, 2015, 'Desktop', 'Desktop Computer i7', 'Head Computer Tech. MIT', 5, '22.12.2015', 251480),
(91, 2015, 'Desktop', 'Desktop Computer i7', 'Head IT MIT Campus', 5, '22.12.2015', 251480),
(92, 2015, 'Desktop', 'Desktop Computer i7', 'Head Automobile Engg. MIT', 23, '22.12.2015', 1156808),
(93, 2015, 'Desktop', 'Desktop Computer i7', 'Controller of Examinations AU', 31, '22.12.2015', 1559176),
(94, 2015, 'Desktop', 'Desktop Computer i7', 'Head Production Tech. MIT', 7, '22.12.2015', 352072),
(95, 2015, 'Desktop', 'Desktop Computer i3', 'Head Chemistry AU', 9, '22.12.2015', 285066),
(96, 2015, 'Desktop', 'Desktop Computer i3', 'Head Mechancial Engg. CEG Campus', 5, '22.12.2015', 158370),
(97, 2015, 'Desktop', 'Desktop Computer i5', 'Director IES CEG Campus', 4, '22.12.2015', 156096),
(98, 2015, 'Desktop', 'Desktop Computer i5', 'Head Mechancial Engg. CEG Campus', 1, '22.12.2015', 39024),
(99, 2015, 'Desktop', 'Desktop Computer i5', 'Head Computer Tech. MIT', 1, '22.12.2015', 39024),
(100, 2015, 'Desktop', 'Desktop Computer i7', 'Head Internal Combustion Engg. Mech.', 2, '22.12.2015', 100592),
(101, 2015, 'Desktop', 'Desktop Computer i7', 'Head Computer Tech. MIT', 2, '22.12.2015', 100592),
(102, 2015, 'Desktop', 'Desktop Computer i7', 'Head Mining Engg. CEG Campus', 11, '22.12.2015', 553256),
(103, 2016, 'Desktop', 'Desktop Computer i3', 'Head Mathematics AU', 25, '03.03.2016', 791850),
(104, 2016, 'Desktop', 'Desktop Computer i3', 'Head Indl. Engg. CEG Campus', 16, '31.05.2016', 624384),
(105, 2016, 'Desktop', 'Desktop Computer i3', 'Head Civil Engg. CEG Campus', 11, '31.05.2016', 429264),
(106, 2016, 'Desktop', 'Desktop Computer i3', 'Head Aerospace Engineering MIT', 3, '31.05.2016', 150888),
(107, 2016, 'Desktop', 'Desktop Computer i5', 'Secretary TNEA', 50, '31.05.2016', 2514800),
(108, 2017, 'Desktop', 'Desktop Computer i7', 'Director Centre for Research', 5, '13.02.2017', 246750),
(109, 2017, 'Desktop', 'Desktop Computer i7', 'Head Geology', 1, '13.02.2017', 49350),
(110, 2017, 'Desktop', 'Desktop Computer i7', 'Director Aerospace Research', 5, '16.02.2017', 281400),
(111, 2017, 'Desktop', 'Desktop Computer i7', 'Director IQAC', 3, '16.02.2017', 176085),
(112, 2017, 'Desktop', 'Desktop Computer i7', 'Director P&D', 1, '16.02.2017', 58695),
(113, 2017, 'Desktop', 'Desktop Computer i5', 'Head R&AC Div. Mechanical CEG Campus', 3, '16.02.2017', 126000),
(114, 2017, 'Desktop', 'Desktop Computer i5', 'Head Transport Engg. Civil Engg. ', 2, '18.02.2017', 84000),
(115, 2017, 'Desktop', 'Desktop Computer i7', 'Head DIST CEG Campus', 4, '24.02.2017', 197400),
(116, 2017, 'Desktop', 'Desktop Computer i3', 'Head Mechancial Engg. CEG Campus', 3, '24.02.2017', 85500),
(117, 2017, 'Desktop', 'Desktop Computer i7', 'Co-ordinator Science and Humanities MIT', 1, '28.02.2017', 58695),
(118, 2017, 'Desktop', 'Desktop Computer i3', 'Head Science & Humanities MIT Campus', 1, '09.03.2017', 27500),
(119, 2017, 'Desktop', 'Desktop Computer i5', 'FA 30 Section', 3, '22.06.2017', 132000),
(120, 2017, 'Desktop', 'Desktop Computer i5', 'Purchase Section', 1, '22.06.2017', 44000),
(121, 2017, 'Desktop', 'Desktop Computer i7', 'Head EEE CEG Campus', 1, '22.06.2017', 59900),
(122, 2017, 'Desktop', 'Desktop Computer i5', 'Head Textile Technology', 3, '06.06.2017', 130980),
(123, 2017, 'Desktop', 'Desktop Computer i5', 'Head Computer Tech. MIT', 1, '11.09.2017', 44000),
(124, 2017, 'Desktop', 'Desktop Computer i5', 'Head Geology', 2, '11.09.2017', 88000),
(125, 2017, 'Desktop', 'Desktop Computer i7', 'Centre for Water Resources', 8, '15.09.2017', 363440),
(126, 2017, 'Desktop', 'Desktop Computer i7', 'Div. of Soil Mechanics', 8, '15.09.2017', 363440),
(127, 2017, 'Desktop', 'Desktop Computer i7', 'Div. of Transportation Engg.', 10, '15.09.2017', 454300),
(128, 2017, 'Desktop', 'Desktop Computer i7', 'Div. of Structural Engg.', 8, '15.09.2017', 363440),
(129, 2017, 'Desktop', 'Desktop Computer i7', 'Institute of Ocean Management', 6, '15.09.2017', 272580),
(130, 2017, 'Desktop', 'Desktop Computer i7', 'Centre for Environmental Studies', 9, '15.09.2017', 408870),
(131, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Electrical Engg.', 18, '15.09.2017', 817740),
(132, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of ECE', 15, '15.09.2017', 681450),
(133, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of IST', 20, '15.09.2017', 908600),
(134, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Printing Tech', 10, '15.09.2017', 454300),
(135, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Maths', 10, '15.09.2017', 454300),
(136, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Physics', 8, '15.09.2017', 363440),
(137, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Chemistry', 8, '15.09.2017', 363440),
(138, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of MBA', 10, '15.09.2017', 454300),
(139, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Geology', 6, '15.09.2017', 272580),
(140, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Media Science', 5, '15.09.2017', 227150),
(141, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Manufacturing', 8, '15.09.2017', 363440),
(142, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Medical Physics', 8, '15.09.2017', 363440),
(143, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Mech. Engineering', 18, '15.09.2017', 817740),
(144, 2017, 'Desktop', 'Desktop Computer i7', 'Planning and Development', 5, '15.09.2017', 227150),
(145, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Chemical', 3, '15.09.2017', 167311),
(146, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Chemical', 1, '15.09.2017', 54994),
(147, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Ceramic Tech', 3, '15.09.2017', 160425),
(148, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Applied Science Tech', 3, '15.09.2017', 160425),
(149, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Textile Tech', 3, '15.09.2017', 160425),
(150, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Bio-Technology', 4, '15.09.2017', 213773),
(151, 2017, 'Desktop', 'Desktop Computer i7', 'Crystal Growth Centre', 3, '15.09.2017', 172057),
(152, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Nano Science', 3, '15.09.2017', 160425),
(153, 2017, 'Desktop', 'Desktop Computer i7', 'Department of Leather Tech', 5, '15.09.2017', 278852),
(154, 2017, 'Desktop', 'Desktop Computer i7', 'Computer Lab', 50, '15.09.2017', 2788517),
(155, 2017, 'Desktop', 'Desktop Computer i7', 'Computer Centre (Computer Practice Lab)', 75, '15.09.2017', 3601154),
(156, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of Computer Tech', 6, '15.09.2017', 288092),
(157, 2017, 'Desktop', 'Desktop Computer i7', 'Computer Centre (CAD Lab)', 30, '15.09.2017', 466465),
(158, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of IT', 12, '15.09.2017', 659927),
(159, 2017, 'Desktop', 'Desktop Computer i7', 'Dept. of ECE', 18, '15.09.2017', 989890),
(160, 2017, 'Desktop', 'Desktop Computer i7', 'Head DIST CEG Campus', 3, '28.09.2017', 176614),
(161, 2017, 'Desktop', 'Desktop Computer i7', 'Head CTDT', 7, '28.09.2017', 412100),
(162, 2017, 'Desktop', 'Desktop Computer i7', 'Controller of Examinations', 3, '28.09.2017', 176614),
(163, 2017, 'Desktop', 'Desktop Computer i7', 'Controller of Examinations', 6, '28.09.2017', 353228),
(164, 2017, 'Desktop', 'Desktop Computer i7', 'Head ECE', 40, '28.09.2017', 1817200),
(165, 2017, 'Desktop', 'Desktop Computer i7', 'Director IRS', 10, '28.09.2017', 534434),
(166, 2017, 'Desktop', 'Desktop Computer i7', 'Head DIST', 6, '28.09.2017', 329963),
(167, 2017, 'Desktop', 'Desktop Computer i7', 'Head EE MIT', 50, '28.09.2017', 2465374),
(168, 2017, 'Desktop', 'Desktop Computer i7', 'Director RCC', 10, '28.09.2017', 534434),
(169, 2017, 'Desktop', 'Desktop Computer i7', 'Director KDC', 6, '28.09.2017', 295845),
(170, 2017, 'Desktop', 'Desktop Computer i7', 'Director Centre for Nano Science & Tech', 6, '28.09.2017', 295845),
(171, 2017, 'Desktop', 'Desktop Computer i7', 'ACOE', 8, '28.09.2017', 470971),
(172, 2017, 'Desktop', 'Desktop Computer i7', 'Head ECE', 1, '28.09.2017', 58871),
(173, 2017, 'Desktop', 'Desktop Computer i7', 'Prof. and Head CT MIT', 2, '28.09.2017', 117743),
(174, 2017, 'Desktop', 'Desktop Computer i7', 'Prof. and Head IT MIT', 10, '28.09.2017', 493075),
(175, 2017, 'Desktop', 'Desktop Computer i7', 'Prof. and Head EEE', 2, '28.09.2017', 109988),
(176, 2017, 'Desktop', 'Desktop Computer i7', 'Director CWR', 4, '28.09.2017', 197230),
(177, 2017, 'Desktop', 'Desktop Computer i7', 'Director CWR', 3, '28.09.2017', 147922),
(178, 2017, 'Desktop', 'Desktop Computer i7', 'Head DECE', 2, '28.09.2017', 117743),
(179, 2017, 'Desktop', 'Desktop Computer i5', 'Head Chemistry AU', 25, '16.11.2017', 1003000),
(180, 2018, 'Desktop', 'Desktop Computer i7', 'PRO\'s Office Rajbhavan', 3, '10.01.2018', 204997),
(181, 2018, 'Desktop', 'Desktop Computer i7', 'Director IQAC', 1, '10.01.2018', 56050),
(182, 2018, 'Desktop', 'Desktop Computer i7', 'Director Recruitment Cell', 2, '25.01.2018', 126282),
(183, 2018, 'Desktop', 'Desktop Computer i5', 'Director Inst. Of Remote Sensing', 6, '22.03.2018', 253464),
(184, 2018, 'Desktop', 'Desktop Computer i5', 'Dean UCE Konam Nagarkoil', 1, '22.03.2018', 42244),
(185, 2018, 'Desktop', 'Desktop Computer i5', 'Director Library CEG Campus', 10, '22.03.2018', 422440),
(186, 2018, 'Desktop', 'Desktop Computer i3', 'Dean BIT Campus Trichy', 70, '28.03.2018', 1858500),
(187, 2018, 'Desktop', 'Desktop Computer i5', 'Dean UCE Kanchipuram', 200, '05.04.2018', 5734800),
(188, 2018, 'Desktop', 'Desktop Computer i5', 'Dean UCE Ariyalur', 300, '05.04.2018', 8602800),
(189, 2018, 'Desktop', 'Desktop Computer i5', 'Dean AU Regional Campus Madurai', 100, '05.04.2018', 2867400),
(190, 2018, 'Desktop', 'Desktop Computer i5', 'Director CUIC CEG Campus', 40, '05.04.2018', 1146960),
(191, 2018, 'Desktop', 'Desktop Computer i5', 'Head Mechancial Engg.', 5, '05.04.2018', 143370),
(192, 2018, 'Desktop', 'Desktop Computer i5', 'Head EEE CEG Campus', 5, '05.04.2018', 143370),
(193, 2018, 'Desktop', 'Desktop Computer i5', 'Head EEE CEG Campus', 7, '05.04.2018', 200718),
(194, 2018, 'Desktop', 'Desktop Computer i5', 'Director CDE CEG Campus', 10, '05.04.2018', 286740),
(195, 2018, 'Desktop', 'Desktop Computer i5', 'Co-ordinator UPE CEG Campus', 2, '05.04.2018', 57348),
(196, 2018, 'Desktop', 'Desktop Computer i5', 'Head Mechancial Engg.', 20, '05.04.2018', 573480),
(197, 2018, 'Desktop', 'Desktop Computer i5', 'Head Industrial Engg. CEG Campus', 10, '05.04.2018', 286740),
(198, 2018, 'Desktop', 'Desktop Computer i5', 'Dean UCE Villupuram', 60, '05.04.2018', 1720440),
(199, 2018, 'Desktop', 'Desktop Computer i5', 'Head Industrial Engg. CEG Campus', 2, '05.04.2018', 57348),
(200, 2018, 'Desktop', 'Desktop Computer i5', 'Co-ordinator App. Sci. & Hum. MIT Campus', 3, '05.04.2018', 86022),
(201, 2018, 'Desktop', 'Desktop Computer i5', 'Director CAI AU', 6, '05.04.2018', 172044),
(202, 2018, 'Desktop', 'Desktop Computer i5', 'Dean SAP Campus', 6, '19.04.2018', 172044),
(203, 2018, 'Desktop', 'Desktop Computer i5', 'Head Medical Physics', 2, '19.04.2018', 57348),
(204, 2018, 'Desktop', 'Desktop Computer i7', 'Head DIST CEG Campus', 10, '21.05.2018', 668647),
(205, 2018, 'Desktop', 'Desktop Computer i7', 'Head DCSE CEG Campus', 90, '21.07.2018', 5240970),
(206, 2018, 'Desktop', 'Desktop Computer i7', 'Director P&D', 26, '21.07.2018', 1388270),
(207, 2018, 'Desktop', 'Desktop Computer i7', 'Head Dept. Instrumentation Engg. MIT Campus', 10, '21.07.2018', 533950),
(208, 2018, 'Desktop', 'Desktop Computer i7', 'Director Library CEG Campus', 5, '21.07.2018', 266975),
(209, 2018, 'Desktop', 'Desktop Computer i7', 'Head Dept. Mechancial Engg. CEG Campus', 5, '21.07.2018', 266975),
(210, 2018, 'Desktop', 'Desktop Computer i7', 'Director Academic Courses', 3, '21.07.2018', 160185),
(211, 2018, 'Desktop', 'Desktop Computer i7', 'Controller of Examinations AU', 1, '21.07.2018', 53395),
(1, 2014, 'Server', 'Server', 'Head CT MIT', 2, '31.12.2014', 119654),
(2, 2014, 'Server', 'Server', 'Dean CEG', 1, '31.12.2014', 264760),
(3, 2014, 'Server', 'Server', 'EEE CEG', 1, '31.12.2014', 140108),
(4, 2015, 'Server', 'Server', 'Chemical Engineering', 2, '05.02.2015', 440268),
(5, 2015, 'Server', 'Server', 'RCC', 1, '26.02.2015', 1350000),
(6, 2015, 'Server', 'Server', 'IT MIT Campus', 1, '26.02.2015', 1350000),
(7, 2015, 'Server', 'Server', 'IT MIT Campus', 1, '26.02.2015', 345000),
(8, 2015, 'Server', 'Server', 'CT MIT Campus', 1, '26.02.2015', 345000),
(9, 2015, 'Server', 'Server', 'Centre for Research', 1, '26.02.2015', 345000),
(10, 2015, 'Server', 'Server', 'Dean MIT Campus', 1, '26.02.2015', 345000),
(11, 2015, 'Server', 'Server', 'Computer Centre MIT Campus', 1, '26.02.2015', 345000),
(12, 2015, 'Server', 'Blade Server', 'CSE CEG Campus', 4, '26.02.2015', 1998000),
(13, 2015, 'Server', 'Blade Server', 'IT CEG Campus', 4, '26.02.2015', 1998000),
(14, 2015, 'Server', 'Server', 'Knowledge Data Centre AU', 2, '09.03.2015', 2700000),
(15, 2015, 'Server', 'Server', 'CSE CEG Campus', 2, '09.03.2015', 690000),
(16, 2015, 'Server', 'Server', 'IT CEG Campus', 2, '09.03.2015', 690000),
(17, 2015, 'Server', 'High End Server', 'Controller of Examinations AU', 4, '12.03.2015', 7854661),
(18, 2015, 'Server', 'High End Server', 'Secretary TANCET Exams. Centre', 1, '23.03.2015', 1963665),
(19, 2015, 'Server', 'High End Server', 'Secretary TNEA Exams. Centre', 1, '23.03.2015', 1963665),
(20, 2015, 'Server', 'High End Server', 'Director KDC AU ', 2, '23.03.2015', 392733),
(21, 2015, 'Server', 'Server', 'Co-ordinator NSS', 1, '27.07.2015', 251522),
(22, 2015, 'Server', 'Server', 'Director Academic Courses', 1, '01.10.2015', 440000),
(23, 2015, 'Server', 'Server', 'Director Recruitment Cell', 1, '12.10.2015', 440000),
(24, 2015, 'Server', 'Server', 'Prof. & Head MBA', 1, '06.11.2015', 197225),
(25, 2016, 'Server', ' Server', 'Head CSE CEG Campus', 1, '03.03.2016', 59000),
(26, 2016, 'Server', ' Server', 'DCSE CEG Campus', 1, '21.03.2016', 189000),
(27, 2016, 'Server', 'Server', 'Head Mining Depart', 1, '21.03.2016', 189000),
(28, 2016, 'Server', ' Server', 'Head ECE CEG Campus', 2, '03.03.2016', 378000),
(29, 2016, 'Server', 'Rack Server', 'Director RCC', 1, '17.06.2016', 440000),
(30, 2017, 'Server', 'Server', 'Head DIST CEG Campus', 1, '30.01.2017', 182700),
(31, 2017, 'Server', 'Server', 'Dean SAP Campus', 1, '30.01.2017', 175350),
(32, 2017, 'Server', 'Server', 'Director RCC', 1, '07.03.2017', 354000),
(33, 2017, 'Server', 'Server', 'Head CWDiv. Mechanical Engg.', 1, '07.03.2017', 152250),
(34, 2017, 'Server', 'Low End Server', 'Head CSE CEG Campus', 4, '05.06.2017', 283500),
(35, 2017, 'Server', 'Server', 'Head Chemistry', 1, '05.06.2017', 231000),
(36, 2017, 'Server', 'High End Server', 'Head CSE CEG Campus', 1, '19.07.2017', 485000),
(37, 2017, 'Server', 'High End Server', 'Director RCC', 1, '20.07.2017', 955000),
(38, 2017, 'Server', 'High End Server', 'Secretary TNEA Exams. Centre', 1, '20.07.2017', 955000),
(39, 2017, 'Server', 'Server', 'Secretary TNEA Exams. Centre', 1, '24.08.2017', 849600),
(40, 2017, 'Server', 'Server', 'Director P&D', 1, '15.09.2017', 213811),
(41, 2017, 'Server', 'Server', 'Head DCSE CEG', 2, '15.09.2017', 804819),
(42, 2017, 'Server', 'Server', 'Director RCC', 1, '15.09.2017', 867349),
(43, 2017, 'Server', 'Server', 'Director KDC', 1, '15.09.2017', 768510),
(44, 2017, 'Server', 'High End Server', 'Director CTDT', 1, '05.10.2017', 919999),
(45, 2017, 'Server', 'HPC Server', 'Head Aerospace Research MIT', 1, '05.10.2017', 700000),
(46, 2017, 'Server', 'High End Server', 'Head DCSE CEG', 1, '28.12.2017', 974000),
(47, 2018, 'Server', 'High End Server', 'Director RCC', 1, '12.01.2018', 974000),
(48, 2018, 'Server', 'Server', 'Head Media Science', 1, '19.01.2018', 325000),
(49, 2018, 'Server', 'Server', 'Dean UCE Dindugul', 1, '28.02.2018', 64000),
(50, 2018, 'Server', 'Server', 'Co-ordinator UPE CEG Campus', 1, '21.03.2018', 183750),
(51, 2018, 'Server', 'Server', 'ACOE CEG Campus', 2, '28.03.2018', 1355962),
(52, 2018, 'Server', 'Server', 'Director KDC CEG Campus', 4, '07.06.2018', 2596000),
(53, 2018, 'Server', 'High End Server', 'Co-ordinator UPE CEG Campus', 1, '07.06.2018', 417375),
(1, 2014, 'Workstation', 'Work Station', 'Aerospace Research', 1, '29.09.2014', 242802),
(2, 2014, 'Workstation', 'Work Station', 'AU-KBC Centre MIT', 1, '29.09.2014', 139585),
(3, 2014, 'Workstation', 'Work Station', 'Head Computer Tech. CEG Campus', 2, '24.12.2014', 125952),
(4, 2014, 'Workstation', 'Work Station', 'Biotechnology', 1, '31.12.2014', 199500),
(5, 2015, 'Workstation', 'Work Station', 'ACOE ', 1, '11.02.2015', 358624),
(6, 2015, 'Workstation', 'Work Station', 'CSE CEG Campus', 5, '26.02.2015', 700000),
(7, 2015, 'Workstation', 'Work Station', 'Exams. Centre TNEA', 4, '11.03.2015', 560000),
(8, 2015, 'Workstation', 'Work Station', 'Centre for Biotechnolgy A.C.Tech.', 1, '25.05.2015', 333500),
(9, 2015, 'Workstation', 'Work Station', 'Head Electronics Engg. MIT Campus', 1, '06.11.2015', 207900),
(10, 2015, 'Workstation', 'Work Station', 'Director EMRC CEG Campus', 2, '06.11.2015', 185000),
(11, 2015, 'Workstation', 'Work Station', 'Head Mechancial Engg. CEG Campus', 1, '22.12.2015', 93114),
(12, 2016, 'Workstation', 'Work Station', 'Director AU-FRG HP 1.3', 2, '25.02.2016', 265125),
(13, 2016, 'Workstation', 'Work Station', 'Director AU-FRG HP 1.4', 1, '25.02.2016', 171917),
(14, 2017, 'Workstation', 'Work Station', 'Director AU-FRG ', 2, '30.01.2017', 174300),
(15, 2017, 'Workstation', 'Work Station', 'Director AU-FRG ', 1, '30.01.2017', 109200),
(16, 2017, 'Workstation', 'Work Station', 'Director AU-FRG ', 2, '30.01.2017', 163800),
(17, 2017, 'Workstation', 'Work Station', 'Head Physics', 1, '13.02.2017', 169050),
(18, 2017, 'Workstation', 'Work Station', 'Head Physics', 1, '16.02.2017', 138600),
(19, 2017, 'Workstation', 'Work Station', 'Director RCC', 1, '24.02.2017', 210000),
(20, 2017, 'Workstation', 'Work Station', 'Head Physics', 1, '20.07.2017', 430500),
(21, 2017, 'Workstation', 'Work Station', 'Dean CEG', 3, '24.08.2017', 559544),
(22, 2017, 'Workstation', 'Work Station', 'Prof. and Head Medical Physics', 1, '21.11.2017', 321788),
(23, 2017, 'Workstation', 'Work Station', 'Director CCC&AR', 3, '28.12.2017', 573480),
(24, 2018, 'Workstation', 'Workstation', 'Head DIST CEG Campus', 1, '03.01.2018', 108560),
(25, 2018, 'Workstation', 'Workstation', 'Head Aerospace Engg. MIT Campus', 1, '20.02.2018', 205000),
(26, 2018, 'Workstation', 'Workstation', 'Head Computer Tech. MIT Campus', 3, '10.03.2018', 350000),
(27, 2018, 'Workstation', 'Workstation', 'Head Manufacturing Engg.', 2, '22.03.2018', 233333),
(28, 2018, 'Workstation', 'Workstation', 'Director AU-FRG CEG Campus', 12, '07.06.2018', 891372),
(29, 2018, 'Workstation', 'Workstation', 'Head DIST CEG Campus', 10, '29.06.2018', 849600),
(1, 2014, 'Laptop', 'Laptop i3', 'Institute of Remote Sensing', 1, '12.09.2014', 35000),
(2, 2014, 'Laptop', 'Laptop i7', 'Finance Officer', 1, '12.09.2014', 63000),
(3, 2014, 'Laptop', 'Laptop i7', 'Prof. Syndicate Section', 1, '12.09.2014', 63000),
(4, 2014, 'Laptop', 'Laptop i7', 'Academic Courses', 3, '12.09.2014', 176255),
(5, 2014, 'Laptop', 'Laptop i7', 'ACOE', 1, '12.09.2014', 58572),
(6, 2014, 'Laptop', 'Laptop i7', 'IQAC', 1, '12.09.2014', 58572),
(7, 2014, 'Laptop', 'Laptop i3', 'Department of ECE', 1, '12.09.2014', 35000),
(8, 2014, 'Laptop', 'Laptop i3', 'Department of Mech', 9, '23.09.2014', 382096),
(9, 2014, 'Laptop', 'Laptop i5', 'RCC', 1, '29.09.2014', 69457),
(10, 2014, 'Laptop', 'Laptop i5', 'CWR', 6, '01.10.2014', 228000),
(11, 2015, 'Laptop', 'Laptop i5', 'Head IT MIT Campus', 1, '18.02.2015', 38000),
(12, 2015, 'Laptop', 'Laptop i5', 'Div. Sciences and Humanities', 1, '18.02.2015', 38000),
(13, 2015, 'Laptop', 'Laptop i5', 'Asst. Prof. Media Science', 1, '03.03.2015', 38000),
(14, 2015, 'Laptop', 'Laptop MacBook', 'RCC AU', 10, '02.03.2015', 792900),
(15, 2015, 'Laptop', 'Laptop i7', 'KDC AU', 1, '09.03.2015', 58968),
(16, 2015, 'Laptop', 'Laptop i7', 'Prof. & Head. Manufacturing', 1, '09.03.2015', 58968),
(17, 2015, 'Laptop', 'Laptop i7', 'Dean A.C.Tech.', 1, '09.03.2015', 58968),
(18, 2015, 'Laptop', 'Laptop i5', 'Prof. & Head. CSE', 1, '09.03.2015', 89900),
(19, 2015, 'Laptop', 'Laptop MacBook', 'Controller of Examination', 1, '12.03.2015', 79290),
(20, 2015, 'Laptop', 'Laptop i5', 'Head Production Tech.', 1, '27.07.2015', 39000),
(21, 2015, 'Laptop', 'Laptop i5', 'Controller of Examinations', 2, '27.07.2015', 100000),
(22, 2015, 'Laptop', 'Laptop i5', 'Electronics Engg. MIT Campus', 2, '27.07.2015', 118500),
(23, 2015, 'Laptop', 'Laptop i5', 'Mechancial Engg CEG Campus', 1, '27.07.2015', 59250),
(24, 2015, 'Laptop', 'Laptop i5', 'Head ISTCEG Campus', 1, '10.08.2015', 59250),
(25, 2015, 'Laptop', 'Laptop i5', 'Prof. & Head Textile Tech.', 2, '10.08.2015', 100000),
(26, 2015, 'Laptop', 'Apple Macbook', 'Director CTDT', 1, '06.11.2015', 118700),
(27, 2015, 'Laptop', 'Laptop i5', 'Head Printing Technology', 2, '22.12.2015', 102900),
(28, 2015, 'Laptop', 'Laptop i7', 'Director Academic Courses', 4, '22.12.2015', 249900),
(29, 2015, 'Laptop', 'Laptop i7', 'Director P & D', 1, '22.12.2015', 62475),
(30, 2015, 'Laptop', 'Laptop i7', 'Co-ordinator Science & Hum. MIT', 1, '22.12.2015', 62475),
(31, 2015, 'Laptop', 'Laptop i3', 'Head NHHID AU', 2, '31.12.2015', 53600),
(32, 2015, 'Laptop', 'Laptop i3', 'Head Medical Physics', 1, '31.12.2015', 26800),
(33, 2015, 'Laptop', 'Laptop i3', 'Head Biotech. A.C.Tech.', 2, '31.12.2015', 53600),
(34, 2015, 'Laptop', 'Laptop i3', 'Director Library CEG Campus', 1, '31.12.2015', 26800),
(35, 2015, 'Laptop', 'Laptop i5', 'Head Biotech. A.C.Tech.', 3, '31.12.2015', 119775),
(36, 2015, 'Laptop', 'Laptop i5', 'Director Library CEG Campus', 1, '31.12.2015', 39925),
(37, 2016, 'Laptop', 'Laptop i3', 'Head CWR CEG Campus', 1, '14.01.2016', 26800),
(38, 2016, 'Laptop', 'Laptop i3', 'Head Chemical Engg. A.C.Tech', 7, '17.02.2016', 210000),
(39, 2016, 'Laptop', 'Laptop i5', 'Head Biotech. A.C.Tech.', 3, '02.03.2016', 119613),
(40, 2016, 'Laptop', 'Laptop i5', 'Head NHHID AU', 1, '02.03.2016', 39871),
(41, 2016, 'Laptop', 'Laptop i5', 'Head English', 1, '02.03.2016', 39871),
(42, 2016, 'Laptop', 'Laptop i5', 'Head Electronics Engg. MIT', 5, '03.03.2016', 249000),
(43, 2016, 'Laptop', 'Laptop i3', 'Dean SAP Campus', 2, '03.03.2016', 91770),
(44, 2016, 'Laptop', 'Laptopi5', 'Head CSE', 1, '03.03.2016', 51450),
(45, 2016, 'Laptop', 'Laptop i7', 'Dean CEG AU', 2, '03.03.2016', 124950),
(46, 2016, 'Laptop', 'Laptop i7', 'IOM CEG ', 1, '03.03.2016', 62475),
(47, 2017, 'Laptop', 'i5 Laptop', 'Division of Central Workshop', 1, '06.01.2017', 40682),
(48, 2017, 'Laptop', 'i5 Laptop', 'IOM CEG ', 2, '06.01.2017', 81365),
(49, 2017, 'Laptop', 'Laptop i7', 'Dierctor Nano Science & Tech', 4, '06.01.2017', 216300),
(50, 2017, 'Laptop', 'Laptop i7', 'Head Automobile Engg. MIT', 1, '30.01.2017', 79275),
(51, 2017, 'Laptop', 'Laptop i7', 'Director IQAC ', 1, '30.01.2017', 56700),
(52, 2017, 'Laptop', 'Laptop i7', 'Director IOM', 1, '30.01.2017', 56700),
(53, 2017, 'Laptop', 'MacBook Pro Laptop ', 'Director P & D', 1, '16.02.2017', 140000),
(54, 2017, 'Laptop', 'Laptop i5', 'Head Electronics Engg. MIT', 5, '24.02.2017', 220000),
(55, 2017, 'Laptop', 'Laptop i7', 'Dean CEG Campus', 4, '25.05.2017', 231000),
(56, 2017, 'Laptop', 'MacBook Pro Laptop ', 'Director EMRC', 1, '05.06.2017', 203000),
(57, 2017, 'Laptop', 'Laptop i5', 'Head Geology', 1, '22.06.2017', 61000),
(58, 2017, 'Laptop', 'Apple Laptop', 'Head Physics', 1, '10.08.2017', 116500),
(59, 2017, 'Laptop', 'Laptop i3', 'Head English', 3, '11.09.2017', 103546),
(60, 2017, 'Laptop', 'Laptop i5', 'Head ECE CEG Campus', 1, '11.09.2017', 48000),
(61, 2017, 'Laptop', 'Laptop i7', 'Head DIST CEG Campus', 8, '26.09.2017', 388928),
(62, 2017, 'Laptop', 'Laptop i5', 'Head Geology', 1, '27.09.2017', 48616),
(63, 2017, 'Laptop', 'Laptop i7', 'Dean AC Tech', 2, '27.09.2017', 119770),
(64, 2017, 'Laptop', 'Laptop i7', 'Head Geology', 1, '27.09.2017', 48616),
(65, 2017, 'Laptop', 'Apple Macbook ', 'Dean A.C.Tech.', 3, '05.10.2017', 508500),
(66, 2017, 'Laptop', 'Laptop i7', 'Head Aerospace Research MIT', 2, '10.10.2017', 97232),
(67, 2017, 'Laptop', 'Laptop i7', 'Head Sciences & Humanities MIT', 2, '10.10.2017', 97232),
(68, 2017, 'Laptop', 'Laptop i7', 'Dean A.C.Tech.', 2, '13.10.2017', 132000),
(69, 2018, 'Laptop', 'Laptop i7', 'Director IQAC', 1, '10.01.2018', 56000),
(70, 2018, 'Laptop', 'Laptop i7', 'Director Academic Courses', 1, '25.01.2018', 56000),
(71, 2018, 'Laptop', 'Laptop i7', 'Director Academic Courses', 1, '25.01.2018', 56000),
(72, 2018, 'Laptop', 'MacBook i7 Laptop', 'Head DIST CEG Campus', 1, '28.02.2018', 200000),
(73, 2018, 'Laptop', 'Laptop i3', 'Director Biotechnology', 3, '21.03.2018', 94164),
(74, 2018, 'Laptop', 'Laptop i3', 'Head Mechancial Engg.', 6, '21.03.2018', 188328),
(75, 2018, 'Laptop', 'Laptop i3', 'Director Biotechnology', 3, '21.03.2018', 94164),
(76, 2018, 'Laptop', 'Laptop i3', 'Head Mechancial Engg.', 6, '21.03.2018', 188328),
(1, 2014, 'iMac', 'iMac', 'Exam. Centre TNEA', 1, '29.12.2014', 176302),
(2, 2015, 'iMac', 'iMac', 'Dean MIT', 1, '19.01.2015', 194200),
(3, 2015, 'iMac', 'iMac', 'Civil Engg. Transportation Div.', 1, '26.02.2015', 74700),
(4, 2018, 'iMac', 'iMac', 'The Director Centre for International Affairs', 1, '11.07.2018', 169000),
(5, 2018, 'iMac', 'iMac', 'Director Bio-Technology', 1, '11.07.2018', 169000),
(6, 2018, 'iMac', 'iMac', 'Head Leather Technology AC Tech', 1, '11.07.2018', 169000),
(7, 2018, 'iMac', 'iMac', 'Head Leather Technology AC Tech', 1, '24.07.2018', 169000);
-- --------------------------------------------------------
--
-- Table structure for table `tbl_uploads`
--
CREATE TABLE `tbl_uploads` (
`ITEM_no` int(11) NOT NULL,
`id` int(10) NOT NULL,
`file` varchar(100) NOT NULL,
`type` varchar(10) NOT NULL,
`size` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `tbl_uploads`
--
INSERT INTO `tbl_uploads` (`ITEM_no`, `id`, `file`, `type`, `size`) VALUES
(8023, 14, '97020-', '', 0),
(8024, 15, '87514-', '', 0),
(8025, 16, '53752-', '', 0),
(8026, 17, '26546-PDF_Choice_List_25.pdf', 'applicatio', 116069);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`USERID` varchar(60) NOT NULL,
`PASSWORD` varchar(60) NOT NULL,
`SESS_ID` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`USERID`, `PASSWORD`, `SESS_ID`) VALUES
('CS', 'CS', 'USER'),
('EC', 'EC', 'USER'),
('MECH', 'MECH', 'USER'),
('RCC', 'RCC', 'RCC'),
('RCCADMIN', 'RCCADMIN', 'RCCADMIN');
-- --------------------------------------------------------
--
-- Table structure for table `vendor`
--
CREATE TABLE `vendor` (
`VENDOR_NAME` varchar(60) NOT NULL,
`VENDOR_ADDRESS` varchar(120) NOT NULL,
`VENDOR_CONTACT_NAME` varchar(60) NOT NULL,
`VENDOR_WEB` varchar(60) NOT NULL,
`VENDOR_MAIL` varchar(60) NOT NULL,
`VENDOR_PHONE` int(12) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `vendor`
--
INSERT INTO `vendor` (`VENDOR_NAME`, `VENDOR_ADDRESS`, `VENDOR_CONTACT_NAME`, `VENDOR_WEB`, `VENDOR_MAIL`, `VENDOR_PHONE`) VALUES
('R1', 'NO 79, ANNA SALAI, CHENNAI', 'VINOTH KUMAR', 'WWW.R1.COM', 'r1vinothkumar@gmail.com', 2147483647),
('R2', 'SAIDAPET, CHENNAI', 'RAVI R', 'WWW.R2.COM', 'r2ravir@gmail.com', 2147483647),
('V1', 'PERUNGUDI, CHENNAI', 'KESAVAN K', 'www.v1.com', 'v1kesavak@gmail.com', 44568932),
('X1', 'ADYAR, CHENNAI', 'ANANTH S', 'www.x1.com', 'x1ananths@gmail.com', 2147483647),
('RAJALAKSHMI SYSTEM PVT.LTD', 'ADYAR, CHENNAI', 'RAJASEKAR V', 'WWW.RAJALAKSHMISPV.COM', 'rajal.rajasekar@gmail.com', 2147483647);
-- --------------------------------------------------------
--
-- Structure for view `item_count`
--
DROP TABLE IF EXISTS `item_count`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `item_count` AS select `rcc_purchase`.`ITEM_NAME` AS `ITEM_NAME`,count(0) AS `COUNT(*)` from `rcc_purchase` group by `rcc_purchase`.`ITEM_NAME` ;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `rcc_purchase`
--
ALTER TABLE `rcc_purchase`
ADD PRIMARY KEY (`ITEM_NO`);
--
-- Indexes for table `rcc_pur_from_babu`
--
ALTER TABLE `rcc_pur_from_babu`
ADD PRIMARY KEY (`ITEM_NO`);
--
-- Indexes for table `system_confi`
--
ALTER TABLE `system_confi`
ADD PRIMARY KEY (`SYS_CONFI_NO`);
--
-- Indexes for table `tbl_uploads`
--
ALTER TABLE `tbl_uploads`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`USERID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `tbl_uploads`
--
ALTER TABLE `tbl_uploads`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
--JOINS
--INNER JOIN
SELECT * FROM nome_tabela_1
INNER JOIN nome_tabela_2
ON nome_tabela_1_ID = nome_tabela_2_ID
--INNER JOIN COM ALIAS
SELECT e.first_name employee, m.first_name manager
FROM employee e
INNER JOIN employee m
ON m.employee_id = e.manager_id
ORDER BY manager;
--RIGHT JOIN
SELECT * FROM nome_tabela_1
RIGHT JOIN nome_tabela_2
ON nome_tabela_1_ID = nome_tabela_2_ID
--RIGHT JOIN ONDE O VALOR E NULL
SELECT * FROM nome_tabela_1
RIGHT JOIN nome_tabela_2
ON nome_tabela_1_ID = nome_tabela_2_ID
WHERE nome_tabela_1_ID IS NULL
--FULL JOIN
SELECT * FROM nome_tabela_1
FULL JOIN nome_tabela_2
ON nome_tabela_1_ID = nome_tabela_2_ID
--FULL JOIN ONDE O VALOR DA PRIMEIRA TABELA OU A SEGUNDA TABELA E NULL
SELECT * FROM nome_tabela_1
FULL JOIN nome_tabela_2
ON nome_tabela_1_ID = nome_tabela_2_ID
WHERE nome_tabela_1_ID IS NULL OR nome_tabela_2_ID IS NULL
--LEFT JOIN
SELECT * FROM nome_tabela_1
LEFT JOIN nome_tabela_2
ON nome_tabela_1_ID = nome_tabela_2_ID
--LEFT JOIN ONDE O VALOR E NULL
SELECT * FROM nome_tabela_1
LEFT JOIN nome_tabela_2
ON nome_tabela_1_ID = nome_tabela_2_ID
WHERE nome_tabela_2_ID IS NULL
select p.product_name, p.unit_price , s.company_name
from products p
left join suppliers s
on s.supplier_id = p.supplier_id
order by p.product_name
select v.id, v.placa, v.id_centro_distribuicao,cd.id, cd.nome, cd.bairro, cd.endereco
from veiculo v
inner join centrodistribuicao cd
on cd.id = v.id_centro_distribuicao order by v.id
select veiculo.id_centro_distribuicao from veiculo where veiculo.id_centro_distribuicao notnull
select * from centrodistribuicao where id = 2
select o.nomevendedor,o.datapedido, c.codigocliente, c.id
from ordem o
inner join cliente c
on c.id = o.id_cliente order by o.nomevendedor,o.datapedido
select * from ordem
select * from cliente where razaosocial like 'BEATRIZ LIMA%'
--FAZENDO SELECTS
select * from food_lite.produto
select * from food_lite.restaurante
SELECT table1.column1, table2.column2...
FROM table1
INNER JOIN table2
ON table1.common_filed = table2.common_field;
select restaurante.id, restaurante.nome,produto.id, produto.nome
from food_lite.restaurante
inner join food_lite.produto
on food_lite.restaurante.id = food_lite.produto.id
where produto.nome = 'Feijão Tropeiro'
select * from food_lite.produto inner join food_lite.restaurante on food_lite.produto.id_restaurante = food_lite.restaurante.id
select restaurante.id, restaurante.nome,produto.id, produto.nome
from food_lite.restaurante
inner join food_lite.produto
on food_lite.restaurante.id = food_lite.produto.id
where food_lite.produto.nome 'Feijão Tropeiro'
-- Lista de restaurantes de Vendem “Feijão tropeiro”
select r.id as id_restaurante, r.nome as nome_restaurante, p.id as id_produto , p.nome as nome_produto
from food_lite.produto
as p
inner join food_lite.restaurante
as r on r.id = p.id_restaurante
where p.nome = 'Feijão Tropeiro'
-- Lista de Produtos com preço por restaurante, ordenado em ordem alfabética pelo nome do restaurante
select r.nome as nome_restaurante, p.nome
as nome_produto, p.valor_unitario as preco
from food_lite.produto as p
inner join food_lite.restaurante
as r on r.id = p.id_restaurante order by p.nome
--Todos os produtos cujos preços são menores que 20 reais
select * from food_lite.produto where valor_unitario < 20
--Nome de todos os clientes que fizeram pedidos no restaurante de CNPJ 40523233000193
select * from food_lite.cliente
select * from food_lite.pedido
select * from food_lite.restaurante
select c.id as id_cliente, c.nome as nome_cliente,
p.id as id_pedido,
r.id as id_restaurante, r.nome as nome_restaurante, r.cnpj as cnpj_restaurante
from food_lite.cliente as c
inner join food_lite.pedido as p on c.id = p.id_cliente
inner join food_lite.restaurante as r on r.id = p.id_restaurante
where r.cnpj = '40523233000193'
--Listagem dos pedidos que receberam pagamento em cartão de crédito
select * from food_lite.pedido
select * from food_lite.pagamento
select * from food_lite.tipo_pagamento
update food_lite.tipo_pagamento set descricao = 'cartao credito' where id = 1
select p.id as id_pedido,
pag.id as id_pagamento, pag.id_tipo_pagamento ,
tp.descricao as descricao
from food_lite.pedido as p
join food_lite.pagamento as pag on p.id = pag.id_pedido
join food_lite.tipo_pagamento as tp on tp.id = pag.id_tipo_pagamento
where tp.descricao = 'cartao credito'
select p.id as pedido,
pag.id_tipo_pagamento as tipo_pagamento,
tp.descricao as descricao
from food_lite.pedido as p
join food_lite.pagamento as pag on p.id = pag.id_pedido
join food_lite.tipo_pagamento as tp on tp.id = pag.id_tipo_pagamento
where tp.descricao = 'cartao credito'
select * from food_lite.cliente
--trazendo as iniciais e a quantidade que se repete
select substring(c.nome, 1,1) inicial, count (*) from food_lite.cliente c Group by substring (c.nome,1,1)
select nome, count(*) from food_lite.cliente group by nome
--relação de cartões ativos sem operação de pagamento de contas nos ultimos 3 meses
select gem.nm_gem as grupo_empresarial,
emp.nm_emp as empresa,
crt.cd_crt as cartao,
cun.nm_cun as nome,
cm.qtde_mes_deposito,
cm.qtde_mes_ativacao
from sc_opr.tbl_crt crt
inner join sc_cad.tbl_fnc fnc on crt.cd_fnc = fnc.cd_fnc
inner join sc_cad.tbl_cun cun on fnc.cd_cun = cun.cd_cun
inner join sc_cad.tbl_emp emp on fnc.cd_emp = emp.cd_emp
inner join sc_cad.tbl_gem gem on emp.cd_gem = gem.cd_gem
inner join sc_analise.tbl_cartoes_mes cm on crt.cd_crt = cm.cartao and cm.mes = 7 and cm.ano = 2019
where cm.ativo = 'S'
and not exists (select 1
from sc_opr.tbl_opr opr
inner join sc_opr.tbl_pls pls on opr.cd_pls = pls.cd_pls
where opr.dt_opr >= current_date - interval '3 months' -- operacoes realizadas nos ultimos 3 meses
and opr.st_opr = 2 --operacoes confirmadas
and opr.cd_top = 22 -- operacoes do tipo pagamento de contas
and pls.cd_crt = crt.cd_crt)
order by qtde_mes_deposito desc, grupo_empresarial, empresa, nome;
|
INSERT INTO xh_userfile.user_file_product(
userid,
username,
schoolid,
schoolname,
gradename,
scorestatus,
scorechn,
rankchn,
scoremath,
rankmath,
scoreeng,
rankeng,
scoresci,
ranksci,
avgstatus,
topstatus,
topnumber,
finalstatus,
datetime)
select
stable1.userid,
stable1.username,
stable1.schoolid,
stable1.schoolname,
stable1.gradename,
stable1.scorestatus,
stable1.scorechn,
stable1.rankchn,
stable1.scoremath,
stable1.rankmath,
stable1.scoreeng,
stable1.rankeng,
stable1.scoresci,
stable1.ranksci,
stable1.avgstatus,
stable1.topstatus,
stable1.topnumber,
stable1.finalstatus,
stable1.datetime
from(
select *,
row_number()over(PARTITION by stab1.userid ORDER BY stab1.scorestatus) userselfrank
from (
SELECT
sta1.userid,
sta1.username,
sta1.schoolid,
sta1.schoolname,
sta1.gradename,
CASE
WHEN ((1-sta1.graderank/sta1.stunum)>=0.9)THEN 1
WHEN ((1-sta1.graderank/sta1.stunum)>=0.8)THEN 2
WHEN ((1-sta1.graderank/sta1.stunum)>=0.7)THEN 3
WHEN ((1-sta1.graderank/sta1.stunum)>=0.6)THEN 4
WHEN ((1-sta1.graderank/sta1.stunum)>=0)THEN 5
ELSE 6 END AS scorestatus,
yuwen.avgscore as scorechn,
yuwen.rankchn,
shuxue.avgscore as scoremath,
shuxue.rankmath,
yingyu.avgscore as scoreeng,
yingyu.rankeng,
kexue.avgscore as scoresci,
kexue.ranksci,
CASE
WHEN ((yuwen.rankchn+shuxue.rankmath+yingyu.rankeng+kexue.ranksci)>=3.1) THEN 1
WHEN ((yuwen.rankchn+shuxue.rankmath+yingyu.rankeng+kexue.ranksci)>=2.2) THEN 4
WHEN ((yuwen.rankchn+shuxue.rankmath+yingyu.rankeng+kexue.ranksci)>=1.3) THEN 3
ELSE 2 END AS avgstatus,
CASE
WHEN (yystwcount.rightlv>=80 )THEN 1
WHEN (essaycount.praisenum>=20)THEN 4
WHEN (ilccount.ranklv>=0.75 )THEN 3
WHEN (readcount.readnum>=100)THEN 2
ELSE 5 END AS topstatus,
CASE
WHEN (yystwcount.rightlv>=80 )THEN yystwcount.rightlv
WHEN (essaycount.praisenum>=20 )THEN essaycount.praisenum
WHEN (ilccount.ranklv>=0.75 )THEN ilccount.ranklv
WHEN (readcount.readnum>=100 )THEN readcount.readnum
ELSE 5 END AS topnumber,
case
when ((1-sta1.graderank/sta1.stunum)>=0.8) THEN 1
WHEN ((1-sta1.graderank/sta1.stunum)>=0.6) THEN 2
WHEN ((1-sta1.graderank/sta1.stunum)<=0.2) THEN 3
else FLOOR( 4 + RAND() * (7 - 3))
end as finalstatus,
unix_timestamp(from_unixtime(unix_timestamp(),'yyyy-MM-dd'),'yyyy-MM-dd')AS datetime
FROM
(select
a1.userid,
a1.username,
a1.schoolid,
a5.schoolname,
a1.gradename,
a2.stunum,
avg(a1.avgscore)AS avgallscore,
rank()over(PARTITION by a1.schoolid,a1.gradename ORDER BY avg(a1.avgscore) DESC) as graderank
FROM xhelktest.user_product_cloudwk_count a1
LEFT JOIN (SELECT aa2.schoolid,aa2.gradename,count(DISTINCT aa2.userid)AS stunum
FROM xhelktest.user_product_cloudwk_count aa2 GROUP BY aa2.schoolid,aa2.gradename)a2
ON a1.schoolid=a2.schoolid AND a1.gradename=a2.gradename
LEFT JOIN xhelktest.school_grade_user a5 ON a1.schoolid=cast (a5.schoolid as int)
GROUP BY a1.userid,a1.username,a1.schoolid,a5.schoolname,a1.gradename,a2.stunum
)sta1
LEFT JOIN
(SELECT
a3.userid,
a3.avgscore,
1-a3.rankfenbu as rankchn
from xhelktest.user_product_cloudwk_count a3
WHERE a3.subject=1
)yuwen ON yuwen.userid=sta1.userid
LEFT JOIN
(SELECT
a3.userid,
a3.avgscore,
1-a3.rankfenbu as rankmath
from xhelktest.user_product_cloudwk_count a3
WHERE a3.subject=2
)shuxue ON shuxue.userid=sta1.userid
LEFT JOIN
(SELECT
a3.userid,
a3.avgscore,
1-a3.rankfenbu as rankeng
from xhelktest.user_product_cloudwk_count a3
WHERE a3.subject=3
)yingyu ON yingyu.userid=sta1.userid
LEFT JOIN
(SELECT
a3.userid,
a3.avgscore,
1-a3.rankfenbu as ranksci
from xhelktest.user_product_cloudwk_count a3
WHERE a3.subject=4
)kexue ON kexue.userid=sta1.userid
LEFT JOIN
(SELECT a4.userid,
a4.readnum
FROM xhelktest.user_product_read_count a4
WHERE a4.readnum>100)readcount
ON sta1.userid=readcount.userid
LEFT JOIN
(SELECT a5.userid,
a5.rightlv
from xh_product.user_yystw_count a5
where a5.rightlv>80) yystwcount
ON sta1.userid=yystwcount.userid
LEFT JOIN
(SELECT a6.userid,
1-a6.scrank/sa6.stunum AS ranklv
FROM xh_product.user_ilc_avgscore_count a6
LEFT JOIN (
SELECT count(DISTINCT a7.userid)AS stunum FROM xh_product.user_ilc_avgscore_count a7)sa6
) ilccount ON sta1.userid=ilccount.userid
LEFT JOIN(
SELECT a7.userid,
a7.praisenum
from xh_product.user_essay_praise_count a7
WHERE a7.praisenum>20
) essaycount ON sta1.userid=essaycount.userid
) stab1 )stable1 where stable1.userselfrank=1
|
Create Procedure mERP_sp_CategoryHandlerList
As
Select SNo, ParentID, CategoryID, Category_Name, [Level]
From ItemCategories IC, CategoryLevelInfo CLI
Where IC.[Level] = CLI.LevelNo
And IC.Active = 1
Order by IC.[Level], IC.CategoryID, IC.ParentID
|
CREATE KEYSPACE IF NOT EXISTS crossover WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '2'} AND durable_writes = true;
CREATE TABLE IF NOT EXISTS crossover.cr_user (
id uuid,
name text,
email text,
created_ts timestamp,
updated_ts timestamp,
PRIMARY KEY(id, email)
)WITH CLUSTERING ORDER BY (email DESC);
CREATE TABLE IF NOT EXISTS crossover.cr_rental_info (
id text,
type text,
city text,
province text,
country text,
zip_code text,
has_air_condition boolean,
has_garden boolean,
has_pool boolean,
is_close_to_beach boolean,
daily_price double,
currency text,
rooms_number double,
created_ts timestamp,
updated_ts timestamp,
last_modified_by text,
PRIMARY KEY (id, type)
) WITH CLUSTERING ORDER BY (type DESC);
|
select count(*) as total_connections, count(case when statement_id is not null then 1 else null end ) as active_connections, count(case when statement_id is null then 1 else null end ) as idle_connections,
client_pid, substring(client_hostname,1,instr(client_hostname,':',-1,1)-1) as host_ip, user_name as user_schema
from sessions
group by client_pid, substring(client_hostname,1,instr(client_hostname,':',-1,1)-1), user_name
order by client_pid, user_name
|
-- 创建表
create table test_collate1(
`char` char(1)
)charset utf8 collate utf8_general_ci;
-- 不区分大小写
insert into test_collate1 values('a'),('B'),('c'),('D');
-- 升序:a ,B , c ,D
create table test_collate2(
`char` char(1)
)charset utf8 collate utf8_bin;
-- 二进制比较(区分大小写)
insert into test_collate2 values('a'),('B'),('c'),('D');
-- 升序:B ,D ,a , c
-- 修改表结构
alter table test_collate1 collate utf8_bin;
-- 将表的校对集选项从默认的utf8_general_ci改成utf8_bin
-- 创建表
create table student(
number char(10) not null, -- number字段不能为空
name varchar(10) not null,
phone_num char(11) default null,-- 允许为空,且默认就是空
gender tinyint default 0-- 用数字表示性别,0代表男,1代表女
)charset utf8;
-- 插入值
insert into student values('itcast0001','李旭东',null,1); -- 因为电话字段必须要输入内容,使用null
insert into student (number,name) values('itcast0002','余旭东');
-- 可以为有默认值的字段不进行数据插入
-- 假设有20个字段:其中有两个字段想使用默认值,而不知道默认值是什么
insert into student values('itcast0003','周娃女',default,default);
-- default就代表使用表中定义的默认值
-- 创建一个用户表
create table `user`(
username varchar(20) not null primary key,
password char(50) not null,
email varchar(50),
name varchar(10),
phone_num char(11)
)charset utf8;
-- md5函数 : md5('密码')
insert into `user` values('mark1',md5('mark1'),default,'陈骏宇',default);
insert into `user` values('mark2',md5('mark2'),'123456@qq.com','唐勇战',default);
insert into `user` values('mark1',md5('wojiazhuzaina'),'3456789@163.com','李少桂',default);
-- 不能插入,因为username字段是主键不允许重复
-- 删除表
drop table if exists `user`;
create table `user`(
username varchar(20) not null,
password char(50) not null,
email varchar(50),
name varchar(10),
phone_num char(11),
primary key(username) -- 单独为primary key添加字段
)charset utf8;
drop table if exists `user`;
create table `user`(
username varchar(20) not null,
password char(50) not null,
email varchar(50),
name varchar(10),
phone_num char(11),
primary key(username,name) -- 复合主键,使用username和name共同组成唯一字段
)charset utf8;
insert into `user` values('mark1',md5('1234567'),'5689@163.com','李少桂',default);
-- 给学生表增加主键
alter table student add primary key(number); -- 将学生表的number字段当做主键
-- 前提:当前学生表的数据中,number字段唯一(没有重复值)
-- 删除主键
alter table student drop primary key; -- 删除学生表的主键
-- 给表中一个不存在的字段增加主键
alter table student add s_id int not null primary key first;
-- 给学生表先增加一个不为空的s_id字段(整型),放到第一个位置,当做主键
-- 这种情况:可以先把所有的数据给清除掉
delete from student;
alter table student add s_id int not null primary key first;
-- 给学生表先增加一个不为空的s_id字段(整型),放到第一个位置,当做主键
alter table student add s_id int not null primary key auto_increment first;
-- 修改表结构
alter table student auto_increment = 1; -- 不可以,因为1已经在使用的过程中
alter table student auto_increment = 10; -- 可以,因为10没有被使用过
insert into student values(null,'itcast0004','刘泽文',null,default); -- s_id = 10
alter table student auto_increment = 5; -- 不生效
-- 查看自增长控制变量
show variables like 'auto_increment%';
create table test_unique(
username varchar(10) unique key,
email varchar(50) not null unique key
)charset utf8;
insert into test_unique values(null,1); -- 第二个字段变成了主键,所以不能重复
insert into test_unique values(null,2);
insert into test_unique values(null,3);
insert into test_unique values('a',4);
insert into test_unique values('a',5); -- 错误,唯一键重复
create table test_unique2(
username varchar(10) not null unique key,
email varchar(50) not null unique key
)charset utf8;
-- 删除唯一键
alter table test_unique drop unique key(username);-- 错误
alter table test_unique drop unique key;-- 错误
alter table test_unique drop index `username`; -- 正确
-- 创建一个教师表
create table teacher(
t_id int not null primary key auto_increment, -- 教师id
name varchar(10) not null comment '教师姓名',#这是老师姓名
salary decimal(6,2) not null comment '教师工资',/*这里是老师的工资
也不知道是真是假
*/
gender enum('male','female') default 'male' comment '教师性别'
)charset utf8;
-- 创建班级表
create table class(
c_id int not null primary key auto_increment,
name varchar(10) not null comment '班级名称',
root varchar(10) comment '教室'
)charset utf8;
insert into class values(null,'PHP140706','D306'),(null,'PHP140508','B2302M'),(null,'PHP140310','B2302');
-- 修改学生表,增加班级ID字段
alter table student add column class_id int not null default 1;
-- 增加一个class_id字段,默认值为1
-- 创建外键
drop table if exists teacher;
create table teacher(
t_id int not null primary key auto_increment,
name varchar(10) not null,
salary decimal(7,2) not null,
phone char(11),
class_id int comment '外键字段,指向class表的c_id',
-- 增加外键,当前表的class_id字段指向class表的c_id字段
foreign key(class_id) references class(c_id)
)charset utf8;
desc teacher;
show create table teacher;
insert into teacher values(null,'李东超','20000',default,1);
insert into teacher values(null,'姚长江','10000',default,2);
insert into teacher values(null,'马浩洋','6000',default,3);
-- 在教师表里插入在class表中不存在的班级id
insert into teacher values(null,'韩振国','10000',default,4);
-- 删除class表中id为1的班级信息(c_id为1的班,有一个教师表中的class_id字段绑定)
delete from class where c_id = 1;
-- 增加一个班级
insert into class values(null,'PHP140226','A203');
-- 为学生增加外键,指向班级
alter table student add constraint `student_class` foreign key(class_id) references class(c_id);
-- 删除学生表中的外键
alter table student drop foreign key student_class;
-- 修改表结构
alter table student modify class_id int;
-- 增加外键,指定约束模式
alter table student
add constraint `student_class` -- 指定外键名称
foreign key(class_id) -- 指定外键字段
references class(c_id) -- 指定外键指向的表
on delete set null -- 当父表删除记录时,子表对应的记录置空
on update cascade; -- 当父表记录更新时,子表跟着更新
-- 删除teacher的外键
alter table teacher drop foreign key teacher_ibfk_1;
-- 新增班级数据(主键指定且已经被占用了)
insert into class values(4,'PHP140815','B201');
insert into class values(4,'PHP140815','B201') on duplicate key update name = 'PHP140815',root = 'B201';
-- 如果主键4不存在,就插入记录,如果存在就更新两个字段
replace into class values(4,'PHP140815','B201');
create table test_insert(
id int primary key auto_increment,
name varchar(10)
)charset utf8;
insert into test_insert values(null,'mark1'),(null,'mark2'),(null,'mark3');
-- 蠕虫复制
insert into test_insert (name) select name from test_insert;
update test_insert set name = 'mark4' where name = 'mark3'; -- 将所有为mark3的改成mark4
update test_insert set name = 'mark4' where name = 'mark3' limit 2; -- 将查询出来mark3的前两个改成mark4
delete from test_insert where name = 'mark1' limit 3;
delete from test_insert where id > 20;
truncate test_insert;
insert into test_insert values(null,'mark6');
insert into test_insert values(null,'mark5');
insert into test_insert (name) select name from test_insert;
-- 查询数据
select * from test_insert;
select all * from test_insert;
select distinct * from test_insert;
select all name from test_insert;
select distinct name from test_insert; |
-- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64)
--
-- Host: localhost Database: article
-- ------------------------------------------------------
-- Server version 5.7.25-0ubuntu0.18.04.2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `articles`
--
DROP TABLE IF EXISTS `articles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `articles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date_d` datetime NOT NULL,
`author_id` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`description` text,
`topic_id` int(11) NOT NULL,
`images` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_articles_1_idx` (`author_id`),
KEY `fk_articles_2_idx` (`topic_id`),
CONSTRAINT `fk_articles_1` FOREIGN KEY (`author_id`) REFERENCES `authors` (`id`) ON UPDATE CASCADE,
CONSTRAINT `fk_articles_2` FOREIGN KEY (`topic_id`) REFERENCES `topics` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `articles`
--
LOCK TABLES `articles` WRITE;
/*!40000 ALTER TABLE `articles` DISABLE KEYS */;
INSERT INTO `articles` VALUES (1,'2019-02-02 12:12:13',1,'What is Lorem Ipsum?','Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries,',1,'https://encrypted-tbn0.gstatic.com/images?q=t');
/*!40000 ALTER TABLE `articles` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `authors`
--
DROP TABLE IF EXISTS `authors`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `authors` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`fio` varchar(125) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `authors`
--
LOCK TABLES `authors` WRITE;
/*!40000 ALTER TABLE `authors` DISABLE KEYS */;
INSERT INTO `authors` VALUES (1,'Braun'),(2,'Пушкин'),(3,'Неизвестный'),(4,'Ремарк '),(5,'Маркес'),(6,'Киз'),(7,'Фицджеральд');
/*!40000 ALTER TABLE `authors` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `comments`
--
DROP TABLE IF EXISTS `comments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`text` varchar(255) DEFAULT NULL,
`article_id` int(11) NOT NULL,
`created_at` datetime DEFAULT NULL,
`user_id` int(11) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_comments_1_idx` (`user_id`),
KEY `fk_comments_2_idx` (`article_id`),
CONSTRAINT `fk_comments_2` FOREIGN KEY (`article_id`) REFERENCES `articles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `comments`
--
LOCK TABLES `comments` WRITE;
/*!40000 ALTER TABLE `comments` DISABLE KEYS */;
INSERT INTO `comments` VALUES (1,'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has su',1,'2019-02-03 12:14:15',1);
/*!40000 ALTER TABLE `comments` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `migrations`
--
DROP TABLE IF EXISTS `migrations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `migrations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `migrations`
--
LOCK TABLES `migrations` WRITE;
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
INSERT INTO `migrations` VALUES (1,'2014_10_12_000000_create_users_table',1),(2,'2014_10_12_100000_create_password_resets_table',1),(3,'2019_02_22_163812_create_roles_table',1),(4,'2019_02_22_163912_create_role_user_table',1);
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `password_resets`
--
DROP TABLE IF EXISTS `password_resets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `password_resets`
--
LOCK TABLES `password_resets` WRITE;
/*!40000 ALTER TABLE `password_resets` DISABLE KEYS */;
/*!40000 ALTER TABLE `password_resets` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `role_user`
--
DROP TABLE IF EXISTS `role_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `role_user` (
`id` int(11) unsigned NOT NULL,
`role_id` int(11) unsigned NOT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_role_user_1_idx` (`user_id`),
KEY `fk_role_user_2_idx` (`role_id`),
CONSTRAINT `fk_role_user_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_role_user_2` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `role_user`
--
LOCK TABLES `role_user` WRITE;
/*!40000 ALTER TABLE `role_user` DISABLE KEYS */;
INSERT INTO `role_user` VALUES (1,1,1),(2,2,2);
/*!40000 ALTER TABLE `role_user` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `roles`
--
DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `roles` (
`id` int(11) unsigned NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `roles`
--
LOCK TABLES `roles` WRITE;
/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
INSERT INTO `roles` VALUES (1,'employee','A Employee User','2019-02-22 14:54:00','2019-02-22 14:54:00'),(2,'manager','A Manager User','2019-02-22 14:54:00','2019-02-22 14:54:00');
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tags`
--
DROP TABLE IF EXISTS `tags`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tags`
--
LOCK TABLES `tags` WRITE;
/*!40000 ALTER TABLE `tags` DISABLE KEYS */;
INSERT INTO `tags` VALUES (1,'движение'),(2,'енергия'),(3,'рецепты'),(4,'блюдо из мяса'),(5,'бег');
/*!40000 ALTER TABLE `tags` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tags_has_articles`
--
DROP TABLE IF EXISTS `tags_has_articles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tags_has_articles` (
`articles_id` int(11) DEFAULT NULL,
`id_tag` int(11) DEFAULT NULL,
KEY `fk_tags_has_articles_1_idx` (`articles_id`),
KEY `fk_tags_has_articles_2_idx` (`id_tag`),
CONSTRAINT `fk_tags_has_articles_1` FOREIGN KEY (`articles_id`) REFERENCES `articles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_tags_has_articles_2` FOREIGN KEY (`id_tag`) REFERENCES `tags` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tags_has_articles`
--
LOCK TABLES `tags_has_articles` WRITE;
/*!40000 ALTER TABLE `tags_has_articles` DISABLE KEYS */;
INSERT INTO `tags_has_articles` VALUES (1,2),(1,1),(1,3);
/*!40000 ALTER TABLE `tags_has_articles` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `topics`
--
DROP TABLE IF EXISTS `topics`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `topics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `topics`
--
LOCK TABLES `topics` WRITE;
/*!40000 ALTER TABLE `topics` DISABLE KEYS */;
INSERT INTO `topics` VALUES (1,'программирование'),(2,'здоровый образ жизни'),(3,'спорт'),(4,'еда');
/*!40000 ALTER TABLE `topics` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'Employee Name','employee@example.com','$2y$10$mmzt1sqEhxoV8/VumVaUue/pu8oi8Yf4q8PbGXmcSUBm8xbHEeu4y',NULL,'2019-02-22 14:54:00','2019-02-22 14:54:00'),(2,'Manager Name','manager@example.com','$2y$10$G4QWi/r5sIKDymf5AAQVw.uP38zc8gshkjDsG/qVo0n428YcJTr.O',NULL,'2019-02-22 14:54:00','2019-02-22 14:54:00');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-02-22 20:57:37
|
/*
Name: MG Views From Widgets detailing target (stack)
Data source: 4
Created By: Admin
Last Update At: 2015-10-09T17:09:12.241292+00:00
*/
select
date,
page,
count(*) as Amount,
from(
SELECT
date,
mod as widget,
CASE
WHEN page_url contains '/developments/' THEN 'developments'
WHEN page_url contains '/listings/' THEN 'listings'
WHEN page_url contains '/search?' THEN 'search'
WHEN page_url contains '/?' THEN 'home'
WHEN (
page_url contains '/london/' or
page_url contains '/miami/' or
page_url contains '/sanfranscisco/' or
page_url contains '/sydney/' or
page_url contains '/newyork/'
) THEN 'TopMarkets'
END AS page,
from(
select string(STRFTIME_UTC_USEC(DATE(date_time), "%m/%d/%Y")) as date, post_prop10 as mod, page_url
FROM (TABLE_QUERY(djomniture:cipomniture_djmansionglobal,'CONCAT(REPLACE(table_id,"_","-"),"-01") BETWEEN STRFTIME_UTC_USEC("{{startdate}}", "%Y-%m-01") and STRFTIME_UTC_USEC("{{enddate}}", "%Y-%m-31")'))
where post_prop10 in ('mansion_global_search_cn_wsj_realestate','mansion_global_sponsor_unit_single_cn_wsj_home')
AND DATE(date_time) >= DATE('{{startdate}}')
AND DATE(date_time) <= DATE('{{enddate}}')
)
)
where widget in ('mansion_global_search_cn_wsj_realestate')
group by date, widget, page
order by date, widget, page desc
|
CREATE TABLE IF NOT EXISTS categories (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
src INTEGER UNIQUE NOT NULL
);
INSERT INTO categories(name, src) VALUES('所有', 0), ('有颜值', 4), ('美腿控', 3), ('黑丝袜', 7), ('小翘臀', 6), ('大胸妹', 2), ('大杂烩', 5) ON CONFLICT (src) DO NOTHING;
CREATE TABLE IF NOT EXISTS cells (
id SERIAL PRIMARY KEY,
img VARCHAR(255) UNIQUE NOT NULL,
text VARCHAR(255) NOT NULL,
cate INTEGER REFERENCES categories (id)
);
CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY,
email VARCHAR(48) UNIQUE NOT NULL,
name VARCHAR(36) UNIQUE NOT NULL,
pwd VARCHAR(255) NOT NULL,
avatar VARCHAR(255) NOT NULL DEFAULT '',
bio VARCHAR(255) NOT NULL DEFAULT ''
);
-- a user has many collection
CREATE TABLE IF NOT EXISTS collections (
id SERIAL PRIMARY KEY,
cell INTEGER REFERENCES cells(id),
owner INTEGER REFERENCES users(id)
);
ALTER TABLE cells ADD COLUMN createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN createdBy integer REFERENCES users (id),
ADD COLUMN updatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE categories ADD COLUMN createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN updatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE users ADD COLUMN createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN updatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
INSERT INTO users(email, name, pwd, avatar, bio) VALUES('null.dbmeinv@athena-anna.com', 'dbmeinv', 'pwd', 'null', 'dbmeinv'),
('null.weibo@athena-anna.com', 'weibo', 'pwd', 'null', 'weibo'),
('null.wechat@athena-anna.com', 'wechat', 'pwd', 'null', 'wechat'),
('null.gank@athena-anna.com', 'gank', 'pwd', 'null', 'gank');
-- 2017-10-06 添加权限控制字段
-- 2 -> public 共有的,谁都可以看
-- 3 -> 受保护的,只有发布者自己能看
-- 4+ -> 暂未定义
ALTER TABLE cells ADD COLUMN premission SMALLINT NOT NULL DEFAULT 2,
ADD COLUMN likes BIGINT NOT NULL DEFAULT 0;
INSERT INTO users(email, name, pwd, avatar, bio) VALUES('null.zhihu@athena-anna.com', 'zhihu', 'pwd', 'null', 'zhihu');
-- 123456 测试数据
INSERT INTO users(email, name, pwd, avatar, bio) VALUES('i@annatarhe.com', 'AnnatarHe', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', 'null', 'make the world a better place');
-- 2017-10-12 添加 from_url 字段,用来证明从哪里添加的
-- 用户 id 是多少
ALTER TABLE cells ADD COLUMN from_url VARCHAR(255) NOT NULL DEFAULT '',
ADD COLUMN from_id VARCHAR(255) NOT NULL DEFAULT '';
-- 2017-10-15 version check for mobile platform
CREATE TABLE IF NOT EXISTS versions(
id SERIAL PRIMARY KEY,
platform VARCHAR(32) NOT NULL DEFAULT '',
version INTEGER NOT NULL DEFAULT 0,
published_by VARCHAR(32) NOT NULL DEFAULT '',
link VARCHAR(255) NOT NULL DEFAULT '',
description TEXT NOT NULL DEFAULT '',
title VARCHAR(32) NOT NULL DEFAULT ''
);
-- 2017-11-21 添加新的三种类型
INSERT INTO categories(name, src) VALUES('知乎', 31), ('微博', 32), ('豆瓣', 33) ON CONFLICT (src) DO NOTHING;
INSERT INTO users(email, name, pwd, avatar, bio) VALUES('null.douban@athena-anna.com', 'douban', 'pwd', 'null', 'douban');
ALTER TABLE cells ADD COLUMN content TEXT NOT NULL DEFAULT '';
INSERT INTO categories(name, src) VALUES('废弃', 51) ON CONFLICT (src) DO NOTHING;
-- 2017-11-30
ALTER TABLE cells ADD COLUMN md5 VARCHAR(255) NOT NULL DEFAULT '';
-- 用户级别 0-19 超级管理员 20-39 一般管理员 40-59 高级用户 60-79 一般用户 80-99 受限用户
ALTER TABLE users ADD COLUMN role SMALLINT NOT NULL DEFAULT 90;
-- 2017-11-21 tags
CREATE TABLE IF NOT EXISTS tags(
id SERIAL PRIMARY KEY,
name VARCHAR(64) NOT NULL DEFAULT '',
desc VARCHAR(255) NOT NULL DEFAULT '',
createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
-- begin
-- tags 和 girls 多对多的关系,用来渐渐替换掉 categories
-- 暂时并未启用,有大块时间的时候,写个工具,做一套数据迁移
CREATE TABLE NOT EXISTS tags_girls(
id SERIAL PRIMARY KEY,
tag_id INTEGER REFERENCES tags(id),
cell_id INTEGER REFERENCES cells(id)
)
--- end
# SELECT categories.id, categories.name, categories.src, count(cells.id) AS count FROM categories, cells WHERE categories.id = cells.cate GROUP BY categories.id;
|
-- 13.07.2009 10:10:01 EEST
-- Adding new column in PP_Cost_Collector
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2009-07-13 10:10:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53721
;
-- 13.07.2009 10:10:37 EEST
-- Adding new column in PP_Cost_Collector
insert into t_alter_column values('pp_order_workflow','ValidateWorkflow','CHAR(1)',null,'NULL')
;
-- 13.07.2009 10:10:38 EEST
-- Adding new column in PP_Cost_Collector
insert into t_alter_column values('pp_order_workflow','ValidateWorkflow',null,'NULL',null)
;
|
CREATE TABLE region (
id SERIAL NOT NULL PRIMARY KEY,
grid_spacing NUMERIC NOT NULL,
max_latitude NUMERIC NOT NULL,
max_longitude NUMERIC NOT NULL,
min_latitude NUMERIC NOT NULL,
min_longitude NUMERIC NOT NULL,
name VARCHAR(255) NOT NULL
);
CREATE TABLE data (
id SERIAL,
region_id INTEGER NOT NULL REFERENCES region(id),
value integer NOT NULL,
shape public.geography(Geometry,4326) NOT NULL,
CONSTRAINT tl_data_pkey PRIMARY KEY (id)
);
CREATE TABLE document (
id SERIAL NOT NULL PRIMARY KEY,
region_id INTEGER NOT NULL REFERENCES region(id),
model_version VARCHAR(255) NOT NULL,
name VARCHAR(255) NOT NULL,
spatial_interpolation_method VARCHAR(255) NOT NULL
); |
-- pm_history
--
-- PM_histor is where we store the historical results from a single data
-- gathering run for a TID/Interface combination. We keep only the
-- historical records here. All active records are in pm_info.
CREATE TABLE pm_history (
timeentered DATE NOT NULL, -- Timestamp for when this PM information was collected
archivetime DATE NOT NULL, -- Timestamp for when this PM info was moved to history
agent VARCHAR2(15), -- IP Address of the server that gathered this data
status NUMBER, -- Status code for this interface as collected from the element
trapnum NUMBER, -- Trap Number if this information was received as an SNMP trap
cause VARCHAR2(10), -- Cause Code
c1 NUMBER, -- PM Counter 1
c2 NUMBER, -- PM Counter 2
c3 NUMBER, -- PM Counter 3
c4 NUMBER, -- PM Counter 4
c5 NUMBER, -- PM Counter 5
c6 NUMBER, -- PM Counter 6
c7 NUMBER, -- PM Counter 7
c8 NUMBER, -- PM Counter 8
c9 NUMBER, -- PM Counter 9
c10 NUMBER, -- PM Counter 10
tid_id NUMBER NOT NULL REFERENCES tids(id), -- The TID this data is for.
interface_id NUMBER NOT NULL REFERENCES interfaces(id), -- The Interface this data is for.
PRIMARY KEY (tid_id, interface_id, timeentered, archivetime)
);
|
ALTER TABLE item ADD COLUMN len2 integer;
|
--
-- hospitals table
--
DROP TABLE hospitals;
CREATE EXTERNAL TABLE hospitals (
provider_id INT,
hospital_name STRING,
address STRING,
city STRING,
state STRING,
zip_code STRING,
county_name STRING,
phone_number STRING,
hospital_type STRING,
hospital_ownership STRING,
emergency_services STRING )
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES(
"separatorChar" = ",",
"quoteChar" = '"',
"escapeChar" = '\\' )
STORED AS TEXTFILE
LOCATION '/user/w205/hospital_compare/hospitals';
--
-- effective_care table
--
DROP TABLE effective_care;
CREATE EXTERNAL TABLE effective_care (
provider_id INT,
hospital_name STRING,
address STRING,
city STRING,
state STRING,
zip_code STRING,
county_name STRING,
phone_number STRING,
condition STRING,
measure_id STRING,
measure_name STRING,
score STRING,
sample STRING,
footnote STRING,
measure_start_date DATE,
measure_end_date DATE )
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES(
"separatorChar" = ",",
"quoteChar" = '"',
"escapeChar" = '\\' )
STORED AS TEXTFILE
LOCATION '/user/w205/hospital_compare/effective_care';
--
-- readmissions table
--
DROP TABLE readmissions;
CREATE EXTERNAL TABLE readmissions (
provider_id INT,
hospital_name STRING,
address STRING,
city STRING,
state STRING,
zip_code STRING,
county_name STRING,
phone_number STRING,
measure_name STRING,
measure_id STRING,
compared_to_national STRING,
denominator INT,
score FLOAT,
lower_estimate FLOAT,
higher_estimate FLOAT,
footnote STRING,
measure_start_date DATE,
measure_end_date DATE )
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES(
"separatorChar" = ",",
"quoteChar" = '"',
"escapeChar" = '\\' )
STORED AS TEXTFILE
LOCATION '/user/w205/hospital_compare/readmissions';
--
-- Measures table
--
DROP TABLE Measures;
CREATE EXTERNAL TABLE measures (
measure_name STRING,
measure_id STRING,
measure_start_quarter STRING,
measure_start_date DATE,
measure_end_quarter STRING,
measure_end_date DATE )
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES(
"separatorChar" = ",",
"quoteChar" = '"',
"escapeChar" = '\\' )
STORED AS TEXTFILE
LOCATION '/user/w205/hospital_compare/Measures';
--
-- surveys_responses table
-- (note: provider id is provider_number in this table)
-- (note: keeping overall ratings as strings, not ints)
--
DROP TABLE surveys_responses;
CREATE EXTERNAL TABLE surveys_responses (
provider_number INT,
hospital_name STRING,
address STRING,
city STRING,
state STRING,
zip_code STRING,
county_name STRING,
communication_with_nurses_achievement_points STRING,
communication_with_nurses_improvement_points STRING,
communication_with_nurses_dimension_score STRING,
communication_with_doctors_achievement_points STRING,
communication_with_doctors_improvement_points STRING,
communication_with_doctors_dimension_score STRING,
responsiveness_of_hospital_staff_achievement_points STRING,
responsiveness_of_hospital_staff_improvement_points STRING,
responsiveness_of_hospital_staff_dimension_score STRING,
pain_management_achievement_points STRING,
pain_management_improvement_points STRING,
pain_management_dimension_score STRING,
communication_about_medicines_achievement_points STRING,
communication_about_medicines_improvement_points STRING,
communication_about_medicines_dimension_score STRING,
cleanliness_and_quietness_of_hospital_environment_achievement_points STRING,
cleanliness_and_quietness_of_hospital_environment_improvement_points STRING,
cleanliness_and_quietness_of_hospital_environment_dimension_score STRING,
discharge_information_achievement_points STRING,
discharge_information_improvement_points STRING,
discharge_information_dimension_score STRING,
overall_rating_of_hospital_achievement_points STRING,
overall_rating_of_hospital_improvement_points STRING,
overall_rating_of_hospital_dimension_score STRING,
hcahps_base_score STRING, --keeping as string, since there may be not-availables
hcahps_consistency STRING ) --keeping as string, since there may be not-availables
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES(
"separatorChar" = ",",
"quoteChar" = '"',
"escapeChar" = '\\' )
STORED AS TEXTFILE
LOCATION '/user/w205/hospital_compare/surveys_responses';
|
alter table behandling drop column resultat;
CREATE TABLE BEHANDLING_RESULTAT
(
ID BIGINT PRIMARY KEY,
FK_BEHANDLING_ID BIGINT REFERENCES behandling (id) NOT NULL,
AKTIV BOOLEAN DEFAULT TRUE NOT NULL,
VERSJON BIGINT DEFAULT 0 NOT NULL,
OPPRETTET_AV VARCHAR DEFAULT 'VL' NOT NULL,
OPPRETTET_TID TIMESTAMP(3) DEFAULT localtimestamp NOT NULL,
ENDRET_AV VARCHAR,
ENDRET_TID TIMESTAMP(3)
);
ALTER SEQUENCE SAMLET_VILKAR_RESULTAT_SEQ RENAME TO BEHANDLING_RESULTAT_SEQ;
insert into BEHANDLING_RESULTAT (id, fk_behandling_id, aktiv, versjon, opprettet_av, opprettet_tid, endret_av, endret_tid)
select id, fk_behandling_id, aktiv, versjon, opprettet_av, opprettet_tid, endret_av, endret_tid from samlet_vilkar_resultat;
CREATE TABLE PERIODE_RESULTAT
(
ID BIGINT PRIMARY KEY,
FK_BEHANDLING_RESULTAT_ID BIGINT REFERENCES BEHANDLING_RESULTAT (id) NOT NULL,
VERSJON BIGINT DEFAULT 0 NOT NULL,
OPPRETTET_AV VARCHAR DEFAULT 'VL' NOT NULL,
OPPRETTET_TID TIMESTAMP(3) DEFAULT localtimestamp NOT NULL,
ENDRET_AV VARCHAR,
ENDRET_TID TIMESTAMP(3),
PERSON_IDENT VARCHAR,
PERIODE_FOM TIMESTAMP(3),
PERIODE_TOM TIMESTAMP(3)
);
CREATE SEQUENCE PERIODE_RESULTAT_SEQ INCREMENT BY 50 START WITH 1000000 NO CYCLE;
alter table vilkar_resultat add column tmp_person_ident varchar;
update vilkar_resultat vr set tmp_person_ident=(select distinct p.person_ident from po_person p where p.id = vr.fk_person_id limit 1);
insert into PERIODE_RESULTAT(id, fk_behandling_resultat_id, person_ident)
select nextval('PERIODE_RESULTAT_SEQ'), samlet_vilkar_resultat_id, tmp_person_ident from vilkar_resultat
group by samlet_vilkar_resultat_id, tmp_person_ident;
update PERIODE_RESULTAT pr
set VERSJON= br.VERSJON, OPPRETTET_AV=br.OPPRETTET_AV, OPPRETTET_TID=br.OPPRETTET_TID, ENDRET_AV=br.ENDRET_AV, ENDRET_TID=br.ENDRET_TID
from BEHANDLING_RESULTAT br
where pr.FK_BEHANDLING_RESULTAT_ID = br.ID;
alter table vilkar_resultat add column fk_periode_resultat_id BIGINT REFERENCES PERIODE_RESULTAT (id);
update vilkar_resultat vr set fk_periode_resultat_id=(select pr.id from PERIODE_RESULTAT pr where vr.samlet_vilkar_resultat_id = pr.FK_BEHANDLING_RESULTAT_ID and vr.tmp_person_ident = pr.person_ident limit 1);
ALTER TABLE vilkar_resultat ALTER COLUMN fk_periode_resultat_id SET NOT NULL;
drop table samlet_vilkar_resultat cascade;
alter table vilkar_resultat
drop column samlet_vilkar_resultat_id,
drop column fk_person_id,
drop column tmp_person_ident; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.