text stringlengths 6 9.38M |
|---|
/*SELECT o.Id AS OrderId, o.CustomerId, o.PaymentTypeId, o.Status
FROM [Order] o
WHERE Status NOT LIKE '%omplete%'*/
--************below query joins
SELECT
--op.OrderId AS OP_OrderId, op.ProductId AS OP_ProductId,
--o.Id AS OrderId, o.CustomerId, o.PaymentTypeId, o.Status,
--p.Id,
--p.ProductTypeId,
--op.Id AS OP_Id,
--p.CustomerId AS Product_CustomerId,
p.Id AS ProductId, p.Price, p.Title, p.Description, p.Quantity,
o.CustomerId AS Order_CustomerId, o.PaymentTypeId, o.Status
FROM OrderProduct op
LEFT JOIN [Order] o ON o.Id = op.OrderId
LEFT JOIN Product p ON p.Id = op.ProductId
--WHERE Status = 'Complete'
|
/**
*
* @public
* @author Alexey
* @name services_by_flat
* @writable lc_flat_services
*/
Select *
From (Select max(t2.grp_services_id) AS grp_services_id, t1.lc_flat_services_id, t1.lc_id
, t1.services_id, t1.fs_active, t1.date_start
, t1.date_end, t1.period_start, t1.period_end, t1.account_id
From lc_flat_services t1
Left Join grp_lc_group t on t1.lc_id = t.lc_id
Left Join grp_services t2 on t.group_id = t2.group_id
and t2.services_id = t1.services_id
and :parAccount = t2.account_id
Where :parAccount = t1.account_id
and (:flat_id = t1.lc_id or :all_flats = true)
Group by t1.lc_flat_services_id, t1.lc_id, t1.services_id, t1.fs_active
, t1.date_start, t1.date_end, t1.period_start, t1.period_end, t1.account_id) q
/*Order by grp_services_id*/ |
SELECT COUNT(*)
FROM Edges e1, Edges e2, Edges e3, Edges e4, Edges e5, Edges e7, Edges e8
WHERE e1.b = e2.a
AND e2.b = e3.a
AND e3.b = e4.a
AND e4.b = e1.a
AND e1.b = e5.a
AND e7.a = e2.a
AND e7.b = e3.b
AND e8.a = e3.a
AND e8.b = e4.b;
|
CREATE TABLE IF NOT EXISTS test (
id INT(10) AUTO_INCREMENT,
ip VARCHAR(15),
createdDate DATETIME,
PRIMARY KEY(id)
); |
CREATE TABLE `phone` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`BrandOfPhone` varchar(100) NOT NULL,
`MoodelOfPhone` varchar(100) NOT NULL,
`premierePrice` decimal(10,2) DEFAULT NULL,
`PriceOfPhone` double DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
CREATE DATABASE TESTDB;
DROP DATABASE TESTDB;
CREATE TABLE NATIONBACK( N_NATIONKEY INT NOT NULL, N_NAME CHAR(25) NOT NULL, N_REGIONKEY INT NOT NULL, N_COMMENT VARCHAR(152) );
SHOW TABLES;
DROP TABLE NATIONBACK;
DESC NATION;
INSERT INTO NATION VALUES (0,'AMERICA',0, 'NOTHING LEFT');
INSERT INTO NATION VALUES ('ID86','AMERICA',0, 'NOTHING LEFT');
INSERT INTO ORDERS VALUES (127664,315000,'F',6.5,'2018/2/29',0,'CLERK101',1,'NICE SERVICE');
DELETE FROM CUSTOMER WHERE C_CUSTKEY=5;
UPDATE PARTSUPP SET PS_AVAILQTY=8774 WHERE PS_PARTKEY=12;
SELECT * FROM CUSTOMER WHERE C_NATIONKEY<10;
SELECT O_ORDERDATE,O_TOTALPRICE FROM ORDERS WHERE O_ORDERDATE='1996-01-02';
SELECT CUSTOMER.C_PHONE, ORDERS.O_ORDERSTATUS FROM CUSTOMER,ORDERS WHERE CUSTOMER.C_CUSTKEY=ORDERS.O_CUSTKEY, CUSTOMER.C_NAME='CUSTOMER#000000001';
UPDATE NATION SET N_REGIONKEY = 316001 WHERE N_NATIONKEY= 15;
ALTER TABLE NATION ADD COLUMN N_COMMENT_2 VARCHAR(32);
ALTER TABLE NATION DROP COLUMN N_COMMENT_2;
ALTER TABLE NATION RENAME TO PROVINCE;
ALTER TABLE NATION ADD PRIMARY KEY (N_NATIONKEY);
ALTER TABLE NATION ADD constraint NATION_FK1 FOREIGN KEY (N_REGIONKEY) REFERENCES REGION(R_REGIONKEY);
ALTER TABLE NATION DROP FOREIGN KEY NATION_FK1;
ALTER TABLE CUSTOMER ADD INDEX IDX_RESIDUAL(C_ACCTBAL);
ALTER TABLE CUSTOMER DROP INDEX IDX_RESIDUAL;
SELECT MAX(P_SIZE) FROM PART;
SELECT AVG(P_SIZE) FROM PART;
SELECT MIN(P_SIZE) FROM PART;
SELECT SUM(P_SIZE) FROM PART;
SELECT O_TOTALPRICE FROM ORDERS WHERE O_CLERK LIKE 'CLERK%';
SELECT CUSTOMER.C_NAME, ORDERS.O_ORDERSTATUS, NATION.N_NATIONKEY FROM CUSTOMER,ORDERS,NATION WHERE CUSTOMER.C_CUSTKEY = ORDERS.O_CUSTKEY, CUSTOMER.C_NATIONKEY = NATION.N_NATIONKEY, NATION.N_NAME = 'CHINA';
SELECT CUSTOMER.C_NAME, ORDERS.O_ORDERSTATUS, NATION.N_NATIONKEY FROM CUSTOMER,ORDERS,NATION,REGION WHERE CUSTOMER.C_CUSTKEY = ORDERS.O_CUSTKEY, CUSTOMER.C_NATIONKEY = NATION.N_NATIONKEY, NATION.N_REGIONKEY = REGION.R_REGIONKEY, NATION.N_NAME='CHINA';
SELECT CUSTOMER.C_NAME, ORDERS.O_ORDERSTATUS, NATION.N_NATIONKEY FROM CUSTOMER,ORDERS,NATION,REGION,LINEITEM WHERE CUSTOMER.C_CUSTKEY = ORDERS.O_CUSTKEY, CUSTOMER.C_NATIONKEY = NATION.N_NATIONKEY, NATION.N_REGIONKEY = REGION.R_REGIONKEY, ORDERS.O_ORDERKEY = LINEITEM.L_ORDERKEY, NATION.N_NAME='CHINA';
SELECT MIN(O_TOTALPRICE), O_ORDERKEY FROM ORDERS GROUP BY O_ORDERKEY LIMIT 5;
SELECT * FROM CUSTOMER WHERE C_CUSTKEY IN (SELECT O_CUSTKEY FROM ORDERS WHERE O_TOTALPRICE > 10);
ALTER TABLE CUSTOMER ADD UNIQUE UIDX_ID(C_CUSTKEY);
ALTER TABLE NATION ADD CONSTRAINT FK_NATION_REGION FOREIGN KEY(N_REGIONKEY) REFERENCES REGION(R_REGIONKEY) ON UPDATE CASCADE;
|
CREATE TABLE "movie_tag" (
tag_id int,
movie_id int,
PRIMARY KEY (tag_id, movie_id),
FOREIGN KEY (tag_id) REFERENCES "tag" (tag_id) ON DELETE CASCADE,
FOREIGN KEY (movie_id) REFERENCES "movie" (movie_id) ON DELETE CASCADE
); |
--List the vendors supplying a line item containing 'CICS', 'COBOL' , 'MVS', or 'VSAM'.
--Include the vendor ID, name, invoice number, line item description and amount.
--Use formatting to reduce the space required and format the amount as currency.
--Order the listing by ID.
SELECT
VENDORS.VENDOR_ID, VENDORS.VENDOR_NAME, INVOICES.INVOICE_ID, INVOICE_LINE_ITEMS.LINE_ITEM_DESCRIPTION, TO_CHAR(INVOICE_LINE_ITEMS.LINE_ITEM_AMT, '$999999999.99') as LineItemsAmount
FROM
VENDORS, INVOICES, INVOICE_LINE_ITEMS
WHERE
VENDORS.VENDOR_ID = INVOICES.VENDOR_ID AND
INVOICES.INVOICE_ID = INVOICE_LINE_ITEMS.INVOICE_ID AND
(INVOICE_LINE_ITEMS.LINE_ITEM_DESCRIPTION LIKE '%CICS%' OR
INVOICE_LINE_ITEMS.LINE_ITEM_DESCRIPTION LIKE '%COBAL%' OR
INVOICE_LINE_ITEMS.LINE_ITEM_DESCRIPTION LIKE '%MVS%' OR
INVOICE_LINE_ITEMS.LINE_ITEM_DESCRIPTION LIKE '%VSAM%')
ORDER BY
VENDOR_ID, INVOICE_ID;
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 01-01-2017 a las 21:43:51
-- Versión del servidor: 10.1.19-MariaDB
-- Versión de PHP: 5.6.28
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: `chilegeeks`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuarios`
--
CREATE TABLE `usuarios` (
`id` int(11) NOT NULL,
`nombre` varchar(20) NOT NULL,
`nick` varchar(20) NOT NULL,
`email` varchar(50) NOT NULL,
`contrasena` varchar(50) NOT NULL,
`contrasena_confirm` varchar(50) NOT NULL,
`fecha` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `usuarios`
--
INSERT INTO `usuarios` (`id`, `nombre`, `nick`, `email`, `contrasena`, `contrasena_confirm`, `fecha`) VALUES
(1, 'asd', 'asd', 'asd@email.com', '123', '202cb962ac59075b964b07152d234b70', '2016-12-29 23:49:12'),
(2, 'Kevin', 'Alexda', 'kevin.diaz.perez@hotmail.com', '123', '202cb962ac59075b964b07152d234b70', '2016-12-30 00:13:08');
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `usuarios`
--
ALTER TABLE `usuarios`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `usuarios`
--
ALTER TABLE `usuarios`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
/*!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 `p_partkey`, `n_name`, `r_name`
from `nation`
left join `region` on `n_nationkey` = `r_regionkey`
inner join `part` on `n_regionkey` = `p_partkey` |
DROP TABLE BATCH_STEP_EXECUTION_CONTEXT ;
DROP TABLE BATCH_JOB_EXECUTION_CONTEXT ;
DROP TABLE BATCH_STEP_EXECUTION ;
DROP TABLE BATCH_JOB_EXECUTION_PARAMS ;
DROP TABLE BATCH_JOB_EXECUTION ;
DROP TABLE BATCH_JOB_INSTANCE ;
DROP SEQUENCE BATCH_STEP_EXECUTION_SEQ;
DROP SEQUENCE BATCH_JOB_EXECUTION_SEQ;
DROP SEQUENCE BATCH_JOB_SEQ; |
USE [001]
/*
SELECT 'Dock' = CASE
WHEN (SH.mode = 1) THEN CAST('Plastics' AS varchar)
WHEN (SH.mode = 2) THEN CAST('Woodshop' As varchar)
WHEN (SH.mode = 3) THEN CAST('Beach' AS varchar)
WHEN (SH.mode = 4) THEN CAST('Central Shipping' AS varchar)
WHEN (SH.mode = 5) THEN CAST('New Everman' AS varchar)
ELSE CAST('Other' AS varchar) END,
/*OH.status AS 'STATUS',*/ CAST(OH.ord_no AS int) AS 'ORDER', CAST(OH.oe_po_no AS int) AS 'PO', /*CAST(OH.cus_no AS int) AS 'CUSTOMER',*/
OH.cus_alt_adr_cd AS 'STORE', rtrim(OL.item_no) AS 'ITEM', rtrim(CI.cus_item_no) AS 'WM_ITEM', /*rtrim(OL.item_desc_1) AS 'ITEM_DESC',*/SH.hand_chg AS 'QTY_SHIPPED', /*CONVERT(varchar, OH.shipping_dt, 101) AS 'EST_SHIP_DATE'*/
CONVERT(varchar, CAST(RTRIM(SH.ship_dt) AS datetime), 101) AS [SHIP_DT], /*CONVERT(varchar, OL.promise_dt, 101) AS 'PROMISE_DATE',*/ /*OH.ship_to_name AS 'SHIP_TO_NAME',*/ /*rtrim(OH.ship_to_addr_2)
AS 'ADDRESS', substring(OH.ship_to_addr_4, 1, (charindex(',', OH.ship_to_addr_4) - 1)) AS 'CITY', substring(OH.ship_to_addr_4, (charindex(',',
OH.ship_to_addr_4) + 2), 2) AS 'STATE', SH.carrier_cd AS 'CARRIER', */rtrim(XX.code) AS 'SCAC', /*rtrim(SH.tracking_no) AS 'TRACKING' */
PL.palletid AS 'PALLET_ID'/*, PL.quantity AS 'SUM_PALLET_QTY',*/ /*OL.qty_ordered AS 'QTY_ORDERED', */
FROM OEORDLIN_SQL OL INNER JOIN
OEORDHDR_SQL OH ON OL.ord_no = OH.ord_no LEFT OUTER JOIN
ARSHTTBL SH ON ltrim(OL.ord_no) = cast(SH.ord_no AS int) AND OL.item_no = SH.filler_0001 LEFT OUTER JOIN
WMPALID PL ON OH.oe_po_no = PL.purchaseorder AND OL.item_no = PL.marco_item_no LEFT OUTER JOIN
OECUSITM_SQL CI ON OL.item_no = CI.item_no AND OH.cus_no = CI.cus_no LEFT OUTER JOIN
EDCSHVFL_SQL XX ON SH.carrier_cd = XX.mac_ship_via
WHERE /* INITIAL WHERE CLAUSE */ ltrim(OH.cus_no) IN ('1575', '20938') AND OH.oe_po_no > '0' AND OH.ord_type = 'O' AND
NOT OH.user_def_fld_4 LIKE '%ON%' AND NOT OH.user_def_fld_4 LIKE '%FX%' AND NOT OH.user_def_fld_4 LIKE '%RP%' AND OH.slspsn_no IN ('011',
'047') AND OH.oe_po_no IS NOT NULL AND SH.void_fg IS NULL AND NOT OL.item_no IN ('ADD ON', 'BACKORDER', 'CAP EX', 'FIXTURE REQUEST',
'INITIAL DIV 01', 'INITIAL RM', 'INITIAL SC', 'INITIAL WNM', 'PROTOTYPE METAL', 'PROTOTYPE PLASTIC', 'PROTOTYPE WOOD', 'REVIEW ITEM',
'SAMPLE','DVD SHELF SET','WM-PETITEMOMZONE','WM-MOVIEDUMPBIN') AND isnumeric(OH.oe_po_no) = 1 /* ONLY PALLET_MISSING_SHIPPED RECORDS */ AND (OH.ord_no IN
(SELECT DISTINCT cast(ord_no AS int)
FROM arshttbl) AND NOT SH.hand_chg IS NULL)
/*For Only Yesterday*/
AND ((SH.void_fg IS NULL) AND (CONVERT(varchar, CAST(RTRIM(SH.ship_dt)
AS datetime), 101) > (CONVERT(VARCHAR, (DATEADD(day, - 6, GETDATE()) ), 101))) )
UNION ALL*/
SELECT 'Dock' = CASE
WHEN (SH.mode = 1) THEN CAST('Plastics' AS varchar)
WHEN (SH.mode = 2) THEN CAST('Woodshop' As varchar)
WHEN (SH.mode = 3) THEN CAST('Beach' AS varchar)
WHEN (SH.mode = 4) THEN CAST('Central Shipping' AS varchar)
WHEN (SH.mode = 5) THEN CAST('New Everman' AS varchar)
ELSE CAST('Other' AS varchar) END,
/*OH.status AS 'STATUS',*/ CAST(OH.ord_no AS int) AS 'ORDER', CAST(OH.oe_po_no AS int) AS 'PO', /*CAST(OH.cus_no AS int) AS 'CUSTOMER',*/
OH.cus_alt_adr_cd AS 'STORE', rtrim(OL.item_no) AS 'ITEM', rtrim(CI.cus_item_no) AS 'WM_ITEM', /*rtrim(OL.item_desc_1) AS 'ITEM_DESC',*/SH.hand_chg AS 'QTY_SHIPPED', /*CONVERT(varchar, OH.shipping_dt, 101) AS 'EST_SHIP_DATE'*/
CONVERT(varchar, CAST(RTRIM(SH.ship_dt) AS datetime), 101) AS [SHIP_DT], /*CONVERT(varchar, OL.promise_dt, 101) AS 'PROMISE_DATE',*/ /*OH.ship_to_name AS 'SHIP_TO_NAME',*/ /*rtrim(OH.ship_to_addr_2)
AS 'ADDRESS', substring(OH.ship_to_addr_4, 1, (charindex(',', OH.ship_to_addr_4) - 1)) AS 'CITY', substring(OH.ship_to_addr_4, (charindex(',',
OH.ship_to_addr_4) + 2), 2) AS 'STATE', SH.carrier_cd AS 'CARRIER', */rtrim(XX.code) AS 'SCAC', /*rtrim(SH.tracking_no) AS 'TRACKING' */
PL.palletid AS 'PALLET_ID'/*, PL.quantity AS 'SUM_PALLET_QTY',*/ /*OL.qty_ordered AS 'QTY_ORDERED', */
FROM OELINHST_SQL OL INNER JOIN
OEHDRHST_SQL OH ON OL.ord_no = OH.ord_no INNER JOIN
ARSHTTBL SH ON ltrim(OL.ord_no) = cast(SH.ord_no AS int) AND OL.item_no = SH.filler_0001 LEFT OUTER JOIN
WMPALID PL ON OH.oe_po_no = PL.purchaseorder AND OL.item_no = PL.marco_item_no LEFT OUTER JOIN
OECUSITM_SQL CI ON OL.item_no = CI.item_no AND OH.cus_no = CI.cus_no LEFT OUTER JOIN
EDCSHVFL_SQL XX ON SH.carrier_cd = XX.mac_ship_via
WHERE /* INITIAL WHERE CLAUSE */ ltrim(OH.cus_no) IN ('1575', '20938') AND OH.oe_po_no > '0' AND OH.ord_type = 'O' AND
NOT OH.user_def_fld_4 LIKE '%ON%' AND NOT OH.user_def_fld_4 LIKE '%FX%' AND NOT OH.user_def_fld_4 LIKE '%RP%' AND OH.slspsn_no IN ('011',
'047') AND OH.oe_po_no IS NOT NULL AND SH.void_fg IS NULL AND NOT OL.item_no IN ('ADD ON', 'BACKORDER', 'CAP EX', 'FIXTURE REQUEST',
'INITIAL DIV 01', 'INITIAL RM', 'INITIAL SC', 'INITIAL WNM', 'PROTOTYPE METAL', 'PROTOTYPE PLASTIC', 'PROTOTYPE WOOD', 'REVIEW ITEM',
'SAMPLE','DVD SHELF SET','WM-PETITEMOMZONE','WM-MOVIEDUMPBIN') AND isnumeric(OH.oe_po_no) = 1 /* ONLY PALLET_MISSING_SHIPPED RECORDS */ AND (OH.ord_no IN
(SELECT DISTINCT cast(ord_no AS int)
FROM arshttbl) AND NOT SH.hand_chg IS NULL)
/*For Only Yesterday*/
AND ((SH.void_fg IS NULL) AND (CONVERT(varchar, CAST(RTRIM(SH.ship_dt)
AS datetime), 101) > (CONVERT(VARCHAR, (DATEADD(day, - 3, GETDATE()) ), 101))) )
|
SELECT TOP(5)
e.EmployeeID,
e.FirstName,
p.Name AS ProjectName
FROM Employees e
JOIN EmployeesProjects ep ON ep.EmployeeID=e.EmployeeID
JOIN Projects p ON ep.ProjectID=p.ProjectID
WHERE p.StartDate > '2002-08-13' AND
p.EndDate IS NULL
ORDER BY e.EmployeeID |
-- sp_plan_hash.sql
-- dependencies: sp_plan_table.sql - creates stats_plan_table view
-- inspired by Tom Kyte article
-- http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:10353453905351
--
-- input is the hash value of the sql statement in stats$sqltext
-- this will be seen in reports created by spreport.sql in 9i+
-- where the snapshot level is 5+
@clears
col which_hash new_value which_hash noprint
prompt Hash Value of SQL from STAT$SQLTEXT:
set echo off term off head off
select '&1' which_hash from dual;
set term on head on
var hashvar number
begin
:hashvar := &&which_hash;
end;
/
set line 120
select plan_table_output
from TABLE(
dbms_xplan.display('stats_plan_table',
(
select distinct spu.plan_hash_value || '_stats'
from stats$sqltext st, stats$sql_plan_usage spu
where st.hash_value = :hashvar
and spu.hash_value = st.hash_value
and spu.text_subset = st.text_subset
),
'serial'
)
)
/
undef 1
|
CREATE TABLE GameSubj
(
Id SERIAL NOT NULL PRIMARY KEY,
Game_id integer not null ,
Command_id INT NOT NULL ,
Goals INT
); |
insert into Student (student_name, gpa, highschool_size) values
('Amy', 3.9, 1000),
('Bob', 3.6, 1500),
('Craig', 3.5, 500),
('Doris', 3.9, 1000),
('Edward', 2.9, 2000),
('Fay', 3.8, 200),
('Gary', 3.4, 800),
('Irene', 3.9, 400),
('Helen', 3.7, 800),
('Jay', 2.9, 1500),
('Amy', 3.9, 1000),
('Craig', 3.4, 2000);
insert into College (college_name, state, enrollment) values
('Stanford', 'CA', 15000),
('Berkeley', 'CA', 36000),
('MIT', 'MA', 10000),
('Cornell', 'NY', 21000);
insert into Apply (student_id, college_name, major, decision) values
(1, 'Stanford', 'CS', 'Y'),
(1, 'Stanford', 'EE', 'N'),
(1, 'Berkeley', 'CS', 'Y'),
(1, 'Cornell', 'EE', 'Y'),
(2, 'Berkeley', 'biology', 'N'),
(3, 'MIT', 'bioengineering', 'Y'),
(3, 'Cornell', 'bioengineering', 'N'),
(3, 'Cornell', 'CS', 'Y'),
(3, 'Cornell', 'EE', 'N'),
(6, 'Stanford', 'history', 'Y'),
(8, 'Stanford', 'CS', 'N'),
(8, 'MIT', 'biology', 'Y'),
(8, 'MIT', 'marine biology', 'N'),
(9, 'Stanford', 'CS', 'Y'),
(9, 'Berkeley', 'CS', 'Y'),
(10, 'Stanford', 'history', 'Y'),
(10, 'Cornell', 'history', 'N'),
(10, 'Cornell', 'psychology', 'Y'),
(12, 'MIT', 'CS', 'N'); |
-- Estructura de la base de datos.
DROP DATABASE IF EXISTS AnalisisSentimientos;
CREATE DATABASE AnalisisSentimientos;
USE AnalisisSentimientos;
DROP TABLE IF EXISTS tclientes;
CREATE TABLE tclientes(
numCliente INT(11) AUTO_INCREMENT,
nombre VARCHAR(50),
ap_paterno VARCHAR(50),
ap_materno VARCHAR(50),
PRIMARY KEY(numCliente)
);
DROP TABLE IF EXISTS tcomentarios;
CREATE TABLE tcomentarios(
id INT(11) AUTO_INCREMENT,
fecha TIMESTAMP NOT NULL,
comentario VARCHAR(255),
numCliente INT(11),
PRIMARY KEY(id),
FOREIGN KEY(numCliente) REFERENCES tclientes(numCliente)
);
DROP TABLE IF EXISTS tclasificacion;
CREATE TABLE tclasificacion(
id INT(11) AUTO_INCREMENT,
clasificacion ENUM('verde','amarillo','rojo','blanco'),
numCliente INT(11),
PRIMARY KEY(id),
FOREIGN KEY(numCliente) REFERENCES tclientes(numCliente);
);
CREATE TABLE tfrases(
id INT(11) AUTO_INCREMENT,
frase VARCHAR(255),
clasificacion ENUM('verde','amarillo','rojo'),
PRIMARY KEY(id)
);
/* Vista para ver los clientes con su clasificacion*/
CREATE VIEW vw_clasificaciones AS
SELECT numCliente,clasificacion FROM tclasificacion;
DELIMITER //
DROP PROCEDURE IF EXISTS sp_clasificacionesllenado;
CREATE PROCEDURE sp_clasificacionesllenado(
)
BEGIN
DECLARE P_NUMCLIENTE INT(11);
DECLARE P_COMENTARIO VARCHAR(255);
DECLARE P_CLASIFICACION VARCHAR(50);
DECLARE done INT DEFAULT FALSE;
DECLARE CUR_COMENT CURSOR FOR
SELECT numCliente,comentario
FROM tcomentarios
WHERE(numCliente,fecha)
IN(SELECT numCliente,max(fecha)
FROM tcomentarios GROUP BY numCliente);
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
OPEN CUR_COMENT;
read_loop: LOOP
FETCH CUR_COMENT INTO P_NUMCLIENTE,P_COMENTARIO;
IF done THEN
LEAVE read_loop;
END IF;
SET P_CLASIFICACION = (SELECT fc_clasificacion(P_COMENTARIO));
INSERT INTO tclasificacion(clasificacion,numCliente) VALUES(P_CLASIFICACION,P_NUMCLIENTE);
END LOOP;
CLOSE CUR_COMENT;
END
//
DELIMITER ;
DELIMITER //
DROP TRIGGER IF EXISTS tg_tcomentarios_AI;
CREATE TRIGGER tg_tcomentarios_AI
AFTER INSERT ON tcomentarios
FOR EACH ROW
BEGIN
DECLARE P_CLASIFICACION VARCHAR(50);
SET P_CLASIFICACION = (SELECT fc_clasificacion(NEW.comentario));
UPDATE tclasificacion SET clasificacion=P_CLASIFICACION WHERE numCliente=NEW.numCliente;
END
//
DELIMITER ;
DELIMITER //
CREATE FUNCTION fc_clasificacion(
P_COMENTARIO VARCHAR(255)
) RETURNS VARCHAR(50) DETERMINISTIC
BEGIN
DECLARE P_CLASIFICACION VARCHAR(50);
IF (LOCATE(("Quiero conocer el fraccionamiento"),P_COMENTARIO)>0)
OR (LOCATE("quiero visitar la casa modelo",P_COMENTARIO)>0) THEN
SET P_CLASIFICACION="verde";
ELSEIF (LOCATE(("llamenme"),P_COMENTARIO)>0)
OR (LOCATE("saber si califico",P_COMENTARIO)>0) THEN
SET P_CLASIFICACION="amarillo";
ELSEIF (LOCATE(("nos puede llamar despues"),P_COMENTARIO)>0)
OR (LOCATE("preguntar a mi esposa",P_COMENTARIO)>0) THEN
SET P_CLASIFICACION="rojo";
ELSE
SET P_CLASIFICACION="blanco";
END IF;
RETURN P_CLASIFICACION;
END
//
DELIMITER ;
INSERT INTO tclientes(nombre,ap_paterno,ap_materno) VALUES
("mario","murillo","tinoco"),
("manuel","melendrez","arango"),
("jesus alberto","ramirez","rodriguez"),
("jose","gonzalez","munguia"),
("carlos","ornelas","busani");
INSERT INTO tcomentarios(comentario,numCliente) VALUES
("Lo siento pero ando un poco ocupado, nos puede llamar despues?",1),
("Lo siento tengo que preguntar a mi esposa.",2),
("Lo siento tengo que preguntar a mi esposa.",3),
("Me interezaría saber si califico o no",4),
("sí,quiero conocer el fraccionamiento",5);
INSERT INTO tcomentarios(comentario,numCliente) VALUES
("Claro,quiero visitar la casa modelo",1),
("Perdón pero no tengo tiempo",3);
|
/*----------------------------------CLIENTE-----------------------------------*/
/*
Il cliente arriva alla cassa e vuole pagare, cerco la sua prenotazione e restituisco il costo totale
*/
select CostoTot
from Prenotazione
where DataInizio = '20-Sep-2018'
and DataFine = '25-Sep-2018'
and NumeroCamera = 303
/*
Un cliente vuole sapere tutte le prenotazioni che ha effettuato nel nostro Hotel
*/
select DataInizio,DataFine,CostoTot,NumeroCamera
from Prenotazione
where CF = 'MRCSMZ66Y67H223W'
order by DataInizio
/*---------------------------------PROPRIETARIO-------------------------------*/
/*
Il proprietario desidera visionare tutti gli stipendi dei receptionist
Per questo si faccia riferimento alla vista "Stipendi" creata nel file hotel.sql
*/
/*
Il proprietario desidera sapere l'ammontare delle entrate di tutto il 2018
*/
select sum(CostoTot)
from Prenotazione
where DataInizio between '01-Jan-2018' and '31-Dec-2018'
and DataFine between '01-Jan-2018' and '31-Dec-2018'
/*
Il proprietario vorrebbe sapere quali sono i clienti che spendono di più,
in particolare quelli che hanno superato i 1000€ in almeno una prenotazione.
*/
select distinct Nome,Cognome
from Cliente c
where exists
(
select *
from Prenotazione p
where c.CF = p.CF
and CostoTot > 1000
)
/*
Il proprietario è curioso di sapere quante persone sono state in hotel durante il mese di settembre
*/
select sum(NumPersone) Persone, count(*) Prenotazioni
from Prenotazione
where DataInizio between '01-Sep-2018' and '30-Sep-2018'
and DataFine between '01-Sep-2018' and '30-Sep-2018'
/*
Ogni mese, dopo aver pagato tutti gli stipendi, essi vengono azzerati per poter "ripartire" da zero
*/
update Receptionist
set Stipendio = 0;
update PersonalePulizie
set Stipendio = 0
/*
Vengono mostrati tutti quei clienti (e la relativa prenotazione) i quali hanno usufruito sia
del posto auto sia del ristorante.
*/
select Nome,Cognome,CodPrenotazione
from Cliente, Prenotazione
where Cliente.CF = Prenotazione.CF
and CodPrenotazione in
(
select CodPrenotazione
from PostoAuto
)
and CodPrenotazione in
(
select CodPrenotazione
from Riservare
)
order by Cognome
/*----------------------------------DIPENDENTE--------------------------------*/
/*
Un receptionist vuole visualizzare tutti i turni che ha effettuato nel mese di settembre
*/
select Giorno, FasciaGiornaliera
from TurnoReception
where CF = 'TGRFTG76T56H225Q'
and Giorno between '01-Sep-2018' and '30-Sep-2018'
/*
Un dipendente vuole sapere, per il mese di Settembre, quante camere ha pulito e in quali giorni
*/
select Giorno, count(*) Camere_Pulite
from TurnoPulizie
where CF = 'PLNRDC88G53M883T'
and Giorno between '01-Sep-2018' and '30-Sep-2018'
group by Giorno
|
--
-- Update sql for MailWizz EMA from version 1.3.7.4 to 1.3.7.5
--
|
-- Count number of songs per playlist
-- with playlist name
SELECT
playlist.PlaylistId as PlaylistId,
playlist.Name as PlaylistName,
Count(playlisttrack.trackId) as NumberOfTracks
FROM Playlist
LEFT JOIN PlaylistTrack on playlist.playlistid = PlaylistTrack.PlaylistId
GROUP BY playlist.PlaylistId |
/*
Navicat MySQL Data Transfer
Source Server : navicat
Source Server Version : 50718
Source Host : localhost:2808
Source Database : usermanage
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2017-11-05 15:41:58
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for batch
-- ----------------------------
DROP TABLE IF EXISTS `batch`;
CREATE TABLE `batch` (
`year` int(255) NOT NULL,
`state` int(255) NOT NULL,
`level` int(255) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of batch
-- ----------------------------
-- ----------------------------
-- Table structure for file
-- ----------------------------
DROP TABLE IF EXISTS `file`;
CREATE TABLE `file` (
`file` varchar(255) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`projectId` int(11) NOT NULL,
`type` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of file
-- ----------------------------
-- ----------------------------
-- Table structure for project
-- ----------------------------
DROP TABLE IF EXISTS `project`;
CREATE TABLE `project` (
`projectId` int(255) NOT NULL AUTO_INCREMENT,
`projectName` varchar(255) NOT NULL,
`projectTeacher` int(255) NOT NULL,
`projectLeading` int(255) NOT NULL,
`projectDate` int(11) NOT NULL,
`projectState` int(255) NOT NULL,
`projectType` int(255) NOT NULL,
`projectExpert` varchar(255) DEFAULT NULL,
`firstGrade` int(11) DEFAULT NULL,
`secondGrade` int(11) DEFAULT NULL,
`projectGrade` int(11) DEFAULT NULL,
`projectLevel` int(255) DEFAULT NULL,
`expertName` varchar(255) DEFAULT NULL,
`leadingName` varchar(255) DEFAULT NULL,
`teacherName` varchar(255) DEFAULT NULL,
PRIMARY KEY (`projectId`),
KEY `projectId` (`projectId`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of project
-- ----------------------------
-- ----------------------------
-- Table structure for projectmember
-- ----------------------------
DROP TABLE IF EXISTS `projectmember`;
CREATE TABLE `projectmember` (
`projectId` int(255) DEFAULT NULL,
`projectMemberId` int(255) DEFAULT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`),
KEY `projectMemberId` (`projectMemberId`),
KEY `projectId` (`projectId`),
CONSTRAINT `projectId` FOREIGN KEY (`projectId`) REFERENCES `project` (`projectId`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `projectMemberId` FOREIGN KEY (`projectMemberId`) REFERENCES `student` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of projectmember
-- ----------------------------
-- ----------------------------
-- Table structure for student
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`studentname` varchar(20) DEFAULT NULL,
`studentpassword` varchar(50) DEFAULT NULL,
`gender` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of student
-- ----------------------------
INSERT INTO `student` VALUES ('1', 'wq', '123', '女');
INSERT INTO `student` VALUES ('7', 'wxq', '123', '女');
INSERT INTO `student` VALUES ('8', 'www', '123', '女');
INSERT INTO `student` VALUES ('9', 'dtl', '123', '男');
INSERT INTO `student` VALUES ('11', 'dxl', '123', '男');
INSERT INTO `student` VALUES ('12', 'dzl', '123', '男');
INSERT INTO `student` VALUES ('14', '温乔', 'wq038300', '女');
-- ----------------------------
-- Table structure for teacher
-- ----------------------------
DROP TABLE IF EXISTS `teacher`;
CREATE TABLE `teacher` (
`id` varchar(11) NOT NULL,
`teacherName` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`power` int(11) NOT NULL,
`college` varchar(255) NOT NULL,
`colllege` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of teacher
-- ----------------------------
INSERT INTO `teacher` VALUES ('1', 'admin', '123', '1', '理工学部', null);
INSERT INTO `teacher` VALUES ('2', 'lcf', '123', '2', '计算机学院', null);
INSERT INTO `teacher` VALUES ('3', 'shls', '123', '3', '信息工程学院', null);
INSERT INTO `teacher` VALUES ('4', 'dtl', '123', '3', '理学院', null);
INSERT INTO `teacher` VALUES ('5', 'lyf', '123', '2', '计算机学院', null);
|
-- load.sql --
LOAD DATA LOCAL INFILE './User.dat'
INTO TABLE `User`
FIELDS TERMINATED BY ' |*| '
LINES TERMINATED BY "\n"
(UserID, Rating, @location, @country) SET Location = nullif(@location, ''),
Country = nullif(@country, '');
LOAD DATA LOCAL INFILE './Category.dat'
INTO TABLE `Category`
FIELDS TERMINATED BY ' |*| '
LINES TERMINATED BY "\n";
LOAD DATA LOCAL INFILE './Item.dat'
INTO TABLE `Item`
FIELDS TERMINATED BY ' |*| '
LINES TERMINATED BY "\n"
(ItemID, Name, Description, @started, @ends, Currently,
First_Bid, @buy_price, Number_of_Bids, Seller) SET Started = STR_TO_DATE(@started, "%Y-%m-%d %H:%i:%s"),
Ends = STR_TO_DATE(@ends, "%Y-%m-%d %H:%i:%s"),
Buy_Price = nullif(@buy_price, '');
LOAD DATA LOCAL INFILE './Item_Category.dat'
INTO TABLE `Item_Category`
FIELDS TERMINATED BY ' |*| '
LINES TERMINATED BY "\n";
LOAD DATA LOCAL INFILE './Bid.dat'
INTO TABLE `Bid`
FIELDS TERMINATED BY ' |*| '
LINES TERMINATED BY "\n"
(UserID, @time, ItemID, Amount) SET Time = STR_TO_DATE(@time, "%Y-%m-%d %H:%i:%s"); |
SELECT inter.sid1,inter.sid2, inter.cid
FROM (SELECT E1.sid AS sid1,E2.sid AS sid2,E1.cid
FROM Enroll E1,Enroll E2
WHERE E1.sid!=E2.sid AND E1.cid=E2.cid AND E1.sid<E2.sid)AS inter
WHERE NOT EXISTS(SELECT *
FROM (SELECT inter.sid1 AS sid1, inter.sid2 AS sid2, Enroll.cid
FROM inter,Enroll
WHERE Enroll.sid=inter.sid1 OR Enroll.sid=inter.sid2) AS full_set
WHERE full_set.sid1=inter.sid1 AND full_set.sid2=inter.sid2 AND full_set.cid!=inter.cid
)
--B.1.A
SELECT inter_sect.sid1, inter_sect.sid2
FROM
(
SELECT E1.sid AS sid1, E2.sid AS sid2, COUNT(E1.cid) AS NUM
FROM Enroll E1, Enroll E2
WHERE E1.sid1<E2.sid2 AND E1.cid=E2.cid
GROUP BY E1.sid,E2.sid
) inter_sect,
(
SELECT E3.sid AS sid, COUNT(E3.cid) AS NUM
FROM Enroll E3
GROUP BY E3.sid
) temp1,
(
SELECT E4.sid AS sid, COUNT(E4.cid) AS NUM
FROM Enroll E4
GROUP BY E4.sid
) temp2
WHERE
(
inter_sect.sid1=temp1.sid
AND inter_sect.sid2=temp2.sid
AND inter_sect.NUM=temp1.NUM
AND inter_sect.NUM=temp2.NUM
)
;
--B.2.B
SELECT temp2.sid
FROM
(
SELECT O3.sid AS sid
FROM onestop O3, onestop O4
WHERE O3.sid=O3.sid AND O3.method<>O4.method
)AS temp2
WHERE temp2.sid NOT IN
(
SELECT temp.sid
FROM onestop,(SELECT O1.sid, O1.method AS method1, O2.method AS method2
FROM onestop O1, onestop O2
WHERE O1.sid=O2.sid AND O1.method<>O2.method) AS temp
WHERE onestop.sid=temp.sid AND onestop.method<>temp.method1 AND onestop.method<>temp.method2
);
|
-- phpMyAdmin SQL Dump
-- version 2.11.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 20, 2011 at 01:54 AM
-- Server version: 5.0.45
-- PHP Version: 5.2.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `sipek`
--
-- --------------------------------------------------------
--
-- Table structure for table `anggaran`
--
CREATE TABLE `anggaran` (
`id` int(11) NOT NULL auto_increment,
`sumber` varchar(255) collate latin1_general_ci NOT NULL,
`jumlah` double NOT NULL,
`tanggal_terima` date NOT NULL,
`periode_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=3 ;
--
-- Dumping data for table `anggaran`
--
INSERT INTO `anggaran` (`id`, `sumber`, `jumlah`, `tanggal_terima`, `periode_id`) VALUES
(1, 'fsdgsgs', 4342525, '2011-05-16', 1),
(2, 'ghgjghjjjh', 689898988, '2011-05-16', 1);
-- --------------------------------------------------------
--
-- Table structure for table `bobot`
--
CREATE TABLE `bobot` (
`kriteria_id` int(11) NOT NULL,
`kriteria_pembanding_id` int(11) NOT NULL,
`nilai` double default NULL,
`periode_id` int(11) NOT NULL,
PRIMARY KEY (`kriteria_id`,`kriteria_pembanding_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
--
-- Dumping data for table `bobot`
--
INSERT INTO `bobot` (`kriteria_id`, `kriteria_pembanding_id`, `nilai`, `periode_id`) VALUES
(1, 1, 9, 1),
(1, 2, 9, 1),
(1, 3, 9, 1),
(1, 4, 9, 1),
(2, 1, 9, 1),
(2, 2, 9, 1),
(2, 3, 9, 1),
(2, 4, 9, 1),
(3, 1, 9, 1),
(3, 2, 9, 1),
(3, 3, 9, 1),
(3, 4, 9, 1),
(4, 1, 9, 1),
(4, 2, 9, 1),
(4, 3, 9, 1),
(4, 4, 9, 1),
(5, 5, 9, 1),
(5, 6, 9, 1),
(5, 7, 9, 1),
(6, 5, 9, 1),
(6, 6, 9, 1),
(6, 7, 9, 1),
(7, 5, 9, 1),
(7, 6, 9, 1),
(7, 7, 9, 1),
(8, 8, 9, 1),
(8, 9, 9, 1),
(8, 10, 9, 1),
(9, 8, 9, 1),
(9, 9, 9, 1),
(9, 10, 9, 1),
(10, 8, 9, 1),
(10, 9, 9, 1),
(10, 10, 9, 1),
(11, 11, 9, 1),
(11, 12, 9, 1),
(12, 11, 9, 1),
(12, 12, 9, 1);
-- --------------------------------------------------------
--
-- Table structure for table `inventaris`
--
CREATE TABLE `inventaris` (
`id` int(11) NOT NULL auto_increment,
`jenis` varchar(255) collate latin1_general_ci NOT NULL,
`jumlah` int(11) NOT NULL,
`kondisi` varchar(255) collate latin1_general_ci NOT NULL,
`periode_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=2 ;
--
-- Dumping data for table `inventaris`
--
INSERT INTO `inventaris` (`id`, `jenis`, `jumlah`, `kondisi`, `periode_id`) VALUES
(1, 'bbfdbfb', 45, 'Baik', 1);
-- --------------------------------------------------------
--
-- Table structure for table `jenis_pelayanan`
--
CREATE TABLE `jenis_pelayanan` (
`id` int(11) NOT NULL auto_increment,
`nama` varchar(255) collate latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=6 ;
--
-- Dumping data for table `jenis_pelayanan`
--
INSERT INTO `jenis_pelayanan` (`id`, `nama`) VALUES
(1, 'Perencanaan, pengendalian, dan pembangunan daerah'),
(2, 'Pengembangan komunikasi, informasi, media massa, dan pemanfaatan TI'),
(3, 'Peningkatan kapasitas sumber daya aparatur'),
(4, 'Peningkatan sarana dan prasarana aparatur'),
(5, 'Pemeliharaan sarana dan prasarana aparatur');
-- --------------------------------------------------------
--
-- Table structure for table `kriteria`
--
CREATE TABLE `kriteria` (
`id` int(11) NOT NULL auto_increment,
`nama` varchar(255) collate latin1_general_ci NOT NULL,
`parent_id` int(11) default NULL,
PRIMARY KEY (`id`),
KEY `parent_id` (`parent_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=13 ;
--
-- Dumping data for table `kriteria`
--
INSERT INTO `kriteria` (`id`, `nama`, `parent_id`) VALUES
(1, 'Finansial', NULL),
(2, 'Pelanggan', NULL),
(3, 'Internal Bisnis', NULL),
(4, 'Pembelajaran dan Pertumbuhan', NULL),
(5, 'Anggaran Masuk', 1),
(6, 'Penggunaan Anggaran', 1),
(7, 'Efektivitas Anggaran', 1),
(8, 'Kepuasan Kerja Pegawai', 3),
(9, 'Peningkatan Kualitas Pegawai', 3),
(10, 'Kualitas Sarana Prasaran', 3),
(11, 'Kualitas SDM', 4),
(12, 'Efektivitas Komunikasi', 4);
-- --------------------------------------------------------
--
-- Table structure for table `pegawai`
--
CREATE TABLE `pegawai` (
`id` int(11) NOT NULL auto_increment,
`nip` varchar(255) collate latin1_general_ci NOT NULL,
`nama` varchar(255) collate latin1_general_ci NOT NULL,
`jabatan` varchar(255) collate latin1_general_ci NOT NULL,
`golongan` varchar(255) collate latin1_general_ci NOT NULL,
`pend_formal` varchar(255) collate latin1_general_ci NOT NULL,
`status` varchar(255) collate latin1_general_ci NOT NULL,
`periode_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=4 ;
--
-- Dumping data for table `pegawai`
--
INSERT INTO `pegawai` (`id`, `nip`, `nama`, `jabatan`, `golongan`, `pend_formal`, `status`, `periode_id`) VALUES
(1, '123456', 'c', 'c', 'II A', 'C', 'C', 0),
(2, 'a', 'a', 'a', 'II A', 'a', 'a', 0),
(3, '345677', 'fff', 'fff', 'II A', 'ggggg', 'gggg', 1);
-- --------------------------------------------------------
--
-- Table structure for table `penugasan`
--
CREATE TABLE `penugasan` (
`pegawai_id` int(11) NOT NULL,
`nama_penugasan` varchar(250) collate latin1_general_ci NOT NULL,
`tingkat` varchar(250) collate latin1_general_ci NOT NULL,
`periode_id` int(11) NOT NULL,
PRIMARY KEY (`pegawai_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
--
-- Dumping data for table `penugasan`
--
-- --------------------------------------------------------
--
-- Table structure for table `periode`
--
CREATE TABLE `periode` (
`id` int(11) NOT NULL auto_increment,
`nama` year(4) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=3 ;
--
-- Dumping data for table `periode`
--
INSERT INTO `periode` (`id`, `nama`) VALUES
(1, 2010),
(2, 2011);
-- --------------------------------------------------------
--
-- Table structure for table `presensi`
--
CREATE TABLE `presensi` (
`pegawai_id` int(11) NOT NULL,
`periode_id` int(11) NOT NULL,
`jumlah_hadir` int(11) NOT NULL,
`jumlah_sakit` int(11) NOT NULL,
`jumlah_izin` int(11) NOT NULL,
`jumlah_tanpa_keterangan` int(11) NOT NULL,
PRIMARY KEY (`pegawai_id`,`periode_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
--
-- Dumping data for table `presensi`
--
INSERT INTO `presensi` (`pegawai_id`, `periode_id`, `jumlah_hadir`, `jumlah_sakit`, `jumlah_izin`, `jumlah_tanpa_keterangan`) VALUES
(0, 1, 333, 2, 4, 4);
-- --------------------------------------------------------
--
-- Table structure for table `program_kerja`
--
CREATE TABLE `program_kerja` (
`id` int(11) NOT NULL auto_increment,
`nama` varchar(255) collate latin1_general_ci NOT NULL,
`jenis_pelayanan_id` int(11) NOT NULL,
`target_anggaran` double NOT NULL,
`tanggal_mulai` date NOT NULL,
`tanggal_target_selesai` date NOT NULL,
`riil_tanggal_selesai` date NOT NULL,
`riil_anggaran` double NOT NULL,
`periode_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `jenis_pelayanan_id` (`jenis_pelayanan_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=2 ;
--
-- Dumping data for table `program_kerja`
--
INSERT INTO `program_kerja` (`id`, `nama`, `jenis_pelayanan_id`, `target_anggaran`, `tanggal_mulai`, `tanggal_target_selesai`, `riil_tanggal_selesai`, `riil_anggaran`, `periode_id`) VALUES
(1, 'sfskgks', 0, 3940000, '2011-06-20', '2011-06-20', '2011-06-20', 4200000, 1);
-- --------------------------------------------------------
--
-- Table structure for table `sasaran`
--
CREATE TABLE `sasaran` (
`id` int(11) NOT NULL auto_increment,
`periode_id` int(11) NOT NULL,
`cash_in` int(11) NOT NULL,
`cash_out` int(11) NOT NULL,
`target_anggaran` int(11) NOT NULL,
`target_penggunaan_anggaran` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;
--
-- Dumping data for table `sasaran`
--
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(255) collate latin1_general_ci NOT NULL,
`password` varchar(255) collate latin1_general_ci NOT NULL,
`is_admin` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=3 ;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `username`, `password`, `is_admin`) VALUES
(1, 'user', 'ee11cbb19052e40b07aac0ca060c23ee', 1),
(2, 'admin', '21232f297a57a5a743894a0e4a801fc3', 0);
|
-- 26/08/2013 02:37:30 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:37:30','YYYY-MM-DD HH24:MI:SS'),100,'ACTIVIDAD DE AGRICULTURA, CRIA PESCA Y FORESTAL NO PRIMARIA','Y',1000003,1000034,'ACTIVIDAD DE AGRICULTURA, CRIA PESCA Y FORESTAL NO PRIMARIA',TO_TIMESTAMP('2013-08-26 14:37:30','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:40:43 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:40:43','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000035,'Extraccion de Piedras,Arcillas Arenas, Minerales y Otros.',TO_TIMESTAMP('2013-08-26 14:40:43','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:41:24 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE LVE_WH_Concept SET Name='EXTRACCION DE PIEDRAS, ARCILLAS ARENAS, MINERALES Y OTROS',Updated=TO_TIMESTAMP('2013-08-26 14:41:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE LVE_WH_Concept_ID=1000035
;
-- 26/08/2013 02:41:35 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE LVE_WH_Concept SET Description='
',Updated=TO_TIMESTAMP('2013-08-26 14:41:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE LVE_WH_Concept_ID=1000034
;
-- 26/08/2013 02:43:25 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:43:25','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000036,'MATADEROS Y FRIGORIFICOS',TO_TIMESTAMP('2013-08-26 14:43:25','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:44:16 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:44:16','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000037,'BENEFICIO DE AVES Y OTROS ANIMALES, EXCEPTO GANADO',TO_TIMESTAMP('2013-08-26 14:44:16','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:45:32 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:45:32','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000038,'PREPARACION Y CONSERVACION DE CARNE Y PRODUCTOS A BASE DE CARNE',TO_TIMESTAMP('2013-08-26 14:45:32','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:46:58 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:46:58','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000039,'PASTEURIZADORAS DE LECHE,FABRICACION Y ELABORACION DE PRODUCTOS LACTEOS DERIVADOS',TO_TIMESTAMP('2013-08-26 14:46:58','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:47:42 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:47:42','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000040,'FABRICACION DE HELADOS Y POSTRES EN GENERAL',TO_TIMESTAMP('2013-08-26 14:47:42','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:51:13 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:51:13','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000041,'ENVASADO Y CONSERVACION DE FRUTAS, LEGUMBRES Y ESPECIES, INCLUSIVE SALSAS, SOPAS, MERMELADAS, FRUTAS SECAS Y EN ALMIBAR, JUGOS Y CONCENTRADOS DE FRUTAS, LEGUMBRES Y HORTALIZAS, VINAGRE Y CONDIMENTOS',TO_TIMESTAMP('2013-08-26 14:51:13','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:52:05 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:52:05','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000042,'CONSERVACION Y ENVASADO DE PESCADO, CRUSTACEOS Y OTROS PRODUCTOS MARINOS.',TO_TIMESTAMP('2013-08-26 14:52:05','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:54:23 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:54:23','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000043,'FABRICACION DE ACEITES Y GRASAS VEGETALES Y ANIMALES, INCLUSIVE MARGARINA, MAYONESA Y LOS SUBPRODUCTOS, HARINAS Y RESIDUOS QUE SE OBTIENEN DEL PROCEDIMIENTO',TO_TIMESTAMP('2013-08-26 14:54:23','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:56:07 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:56:07','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000044,'PRODUCTOS DE MOLINERA, PILADO Y TRILLADO DE SUBPRODUCTOS DERIVADOS (TRIGO, ARROZ, CEREALES Y LEGUMINOSAS)',TO_TIMESTAMP('2013-08-26 14:56:07','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:57:02 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:57:02','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000045,'ELABORACION Y REFINADO DE AZUCAR Y OTROS PRODUCTOS DE CENTRALES AZUCAREROS',TO_TIMESTAMP('2013-08-26 14:57:02','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:57:57 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:57:56','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000046,'ELABORACION DE PRODUCTOS DE PANADERIA Y PASTA ALIMENTICIAS',TO_TIMESTAMP('2013-08-26 14:57:56','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:58:27 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:58:27','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000047,'ELABORACION DE PAPELON (ESPECIFICAMENTE)',TO_TIMESTAMP('2013-08-26 14:58:27','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:58:56 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:58:56','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000048,'FABRICACION DE CHOCOLATES Y OTROS PRODUCTOS DE CACAO',TO_TIMESTAMP('2013-08-26 14:58:56','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 02:59:31 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 14:59:31','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000049,'FABRICACION DE CARAMELOS, GALLETAS, CONFITERIA Y SIMILARES',TO_TIMESTAMP('2013-08-26 14:59:31','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:00:33 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:00:33','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000050,'MOLIENDA Y TORREFACCION DE CAFE Y PREPARACION O TRANSFORMACION DE TE Y PRODUCTOS SIMILARES',TO_TIMESTAMP('2013-08-26 15:00:33','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:01:08 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:01:08','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000051,'FABRICACION DE HIELO',TO_TIMESTAMP('2013-08-26 15:01:08','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:01:42 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:01:42','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000052,'ELABORACION DE ALIMENTOS PREPARADOS PARA ANIMALES',TO_TIMESTAMP('2013-08-26 15:01:42','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:03:01 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:03:01','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000053,'FABRICACION DE PRODUCTOS ALIMENTICIOS NO ESPECIFICADOS EN LOS RUBROS ANTERIORES',TO_TIMESTAMP('2013-08-26 15:03:01','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:04:14 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:04:14','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000054,'DESTILACION, RECTIFICACION Y MEZCLA DE ALCOHOL Y ELABORACION DE BEBIDAS ALCOHOLICAS, INCLUSIVE VINOS Y CERVEZAS',TO_TIMESTAMP('2013-08-26 15:04:14','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:05:15 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:05:15','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000055,'ELABORACION Y EMBOTELLADO DE BEBIDAS GASEOSAS, MALTA Y REFRESCOS EN GENERAL (NO ALCOHOLICAS)',TO_TIMESTAMP('2013-08-26 15:05:15','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:07:30 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:07:30','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000056,'TRATAMIENTO Y EMBOTELLADO DE AGUAS NATURALES Y MINERALES ',TO_TIMESTAMP('2013-08-26 15:07:30','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:09:08 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:09:08','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000057,'FABRICACION DE CIGARRILLOS Y TABACOS (CIGARRILLO SOBRE EL VALOR DEL PAPEL QUE CONSUMAN TRIMESTRALMENTE PARA SU ELABORACION)',TO_TIMESTAMP('2013-08-26 15:09:08','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:13:04 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:13:04','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000058,'ELABORACION DE CHIMO Y TABACO PARA MASTICAR Y PICADURAS DE PIPAS',TO_TIMESTAMP('2013-08-26 15:13:04','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:19:41 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:19:41','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000059,'FABRICACION DE FILAMENTOS Y FIBRAS TEXTILES,HILADOS, TELAS,ENCAJES,TEJIDOS, ARTICULOS TEXTILES PARA EL HOGAR,ARTICULOS DE LONA Y SIMILARES ',TO_TIMESTAMP('2013-08-26 15:19:41','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:20:10 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:20:10','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000060,'FABRICACION DE TAPICES Y ALFOMBRAS',TO_TIMESTAMP('2013-08-26 15:20:10','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:21:28 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:21:28','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000061,'FABRICACION DE CORDELES, MECATES Y ARTICULOS CONEXOS',TO_TIMESTAMP('2013-08-26 15:21:28','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:22:26 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:22:26','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000062,'FABRICACION DE TEXTILES NO ESPECIFICADOS EN RUBROS ANTERIORES',TO_TIMESTAMP('2013-08-26 15:22:26','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:23:00 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:23:00','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000063,'FABRICACION DE PRENDAS DE VESTIR, EXCEPTO CAZADO',TO_TIMESTAMP('2013-08-26 15:23:00','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:24:21 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:24:21','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000064,'INDUSTRIA DE PREPARACION DEL TEÑIDO, ACABADO, REPUJADO DE PIELES, CUERO Y AFINES',TO_TIMESTAMP('2013-08-26 15:24:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:27:27 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:27:26','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000065,'FABRICACION DE CARTERAS, ARTICULOS DE VIAJE, TALABARTERIA, ARTICULOS PARA USO INDUSTRIAL Y DE SEGURIDAD, BILLETERAS Y SIMILARES DE CUERO, Y SUCEDANEOS DEL CUERO, EXCEPTO CALZADO Y PRENDAS DE VESTIR',TO_TIMESTAMP('2013-08-26 15:27:26','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:29:50 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:29:50','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000066,'FABRICACION DE ZAPATOS DE CUERO, TELA Y OTROS MATERIALES (EXCEPTO CAUCHO O PLASTICOS)',TO_TIMESTAMP('2013-08-26 15:29:50','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:30:17 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE LVE_WH_Concept SET Name='FABRICACION DE ZAPATOS DE CUERO, TELA Y OTROS MATERIALES (EXCEPTO CAUCHO O PLASTICOS), PARTES Y ACCESORIOS PARA CALZADO',Updated=TO_TIMESTAMP('2013-08-26 15:30:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE LVE_WH_Concept_ID=1000066
;
-- 26/08/2013 03:33:30 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:33:30','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000067,'ASERRADEROS Y TALLERES DE ACEPILLADORA, FABRICACION DE MADERAS, LAMINAS Y TABLEROS DE MADERA, MATERIALES DE MADERA PARA LA CONSTRUCCION DE EDFICACIONES, CAJAS, BARRILES, Y OTROS ENVASES DE MADERA',TO_TIMESTAMP('2013-08-26 15:33:30','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:34:52 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:34:52','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000068,'FABRICACION DE CESTAS. MANGOS DE MADERAS PARA HERRAMIENTAS Y UTENSILIOS ARTICULOS MENUDOS DE MADERA, ATAUDES DE MADERA O METAL ',TO_TIMESTAMP('2013-08-26 15:34:52','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:36:31 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:36:31','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000069,'FABRICACION DE MUEBLES Y ACCESORIOS DE MADERA, RATAN, MIMBRE Y OTRAS FIBRAS, TAPIZADO DE MUEBLES Y VEHICULOS',TO_TIMESTAMP('2013-08-26 15:36:31','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:37:27 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:37:27','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000070,'FABRICACION DE PULPA DE MADERA, PAPEL CARTOS,ENVASES DE PAPEL,CARTON Y ARTICULOS NO ESPECIFICADOS',TO_TIMESTAMP('2013-08-26 15:37:27','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:37:55 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:37:55','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000071,'LITOGRAFIAS, TIPOGRAFIAS E IMPRENTAS EN GENERAL',TO_TIMESTAMP('2013-08-26 15:37:55','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:38:40 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:38:40','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000072,'EDICION DE LIBROS, CUADERNOS Y MATERIALES DIDACTICOS IMPRESOS',TO_TIMESTAMP('2013-08-26 15:38:40','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:39:41 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:39:41','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000073,'INDUSTRIAS QUIMICAS BASICAS, INCLUSIVE GAS INDUSTRIAL LIQUIDO O SOLIDO A PRESION',TO_TIMESTAMP('2013-08-26 15:39:41','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:40:09 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:40:09','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000074,'FABRICACION DE OTROS PRODUCTOS QUIMICOS',TO_TIMESTAMP('2013-08-26 15:40:09','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 03:40:25 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Concept (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,LVE_WH_Concept_ID,Name,Updated,UpdatedBy) VALUES (11,0,TO_TIMESTAMP('2013-08-26 15:40:25','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000003,1000075,'INDUSTRIA DE CAUCHO Y TRIPAS',TO_TIMESTAMP('2013-08-26 15:40:25','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 26/08/2013 04:13:08 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.600000000000,TO_TIMESTAMP('2013-08-26 16:13:08','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',1000056,1000034,'N',100,TO_TIMESTAMP('2013-08-26 16:13:08','YYYY-MM-DD HH24:MI:SS'),100,'1000000')
;
-- 26/08/2013 04:16:41 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM LVE_WH_Combination WHERE LVE_WH_Combination_ID=1000056
;
-- 26/08/2013 04:20:13 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0,TO_TIMESTAMP('2013-08-26 16:20:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',1000057,1000034,'N',100.000000000000,TO_TIMESTAMP('2013-08-26 16:20:13','YYYY-MM-DD HH24:MI:SS'),100,'1000001')
;
-- 26/08/2013 04:21:52 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM LVE_WH_Combination WHERE LVE_WH_Combination_ID=1000057
;
-- 26/08/2013 04:26:41 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.600000000000,TO_TIMESTAMP('2013-08-26 16:26:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000058,1000034,'N',100,TO_TIMESTAMP('2013-08-26 16:26:41','YYYY-MM-DD HH24:MI:SS'),100,'11111')
;
-- 26/08/2013 04:30:36 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,1.500000000000,TO_TIMESTAMP('2013-08-26 16:30:36','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',1000059,1000035,'N',100,TO_TIMESTAMP('2013-08-26 16:30:36','YYYY-MM-DD HH24:MI:SS'),100,'1000002')
;
-- 26/08/2013 04:31:43 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM LVE_WH_Combination WHERE LVE_WH_Combination_ID=1000059
;
-- 26/08/2013 04:32:36 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,1.500000000000,TO_TIMESTAMP('2013-08-26 16:32:36','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000060,1000035,'N',100,TO_TIMESTAMP('2013-08-26 16:32:36','YYYY-MM-DD HH24:MI:SS'),100,'21901')
;
-- 26/08/2013 04:34:09 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,1.500000000000,TO_TIMESTAMP('2013-08-26 16:34:09','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000061,1000036,'N',100,TO_TIMESTAMP('2013-08-26 16:34:09','YYYY-MM-DD HH24:MI:SS'),100,'31111')
;
-- 26/08/2013 04:36:35 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:36:35','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000062,1000037,'N',100,TO_TIMESTAMP('2013-08-26 16:36:35','YYYY-MM-DD HH24:MI:SS'),100,'31112')
;
-- 26/08/2013 04:37:48 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:37:48','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000063,1000038,'N',100,TO_TIMESTAMP('2013-08-26 16:37:48','YYYY-MM-DD HH24:MI:SS'),100,'31113')
;
-- 26/08/2013 04:40:42 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:40:42','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000064,1000039,'N',100,TO_TIMESTAMP('2013-08-26 16:40:42','YYYY-MM-DD HH24:MI:SS'),100,'31114')
;
-- 26/08/2013 04:41:24 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:41:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000065,1000040,'N',100,TO_TIMESTAMP('2013-08-26 16:41:24','YYYY-MM-DD HH24:MI:SS'),100,'31115')
;
-- 26/08/2013 04:43:37 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:43:37','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000066,1000041,'N',100,TO_TIMESTAMP('2013-08-26 16:43:37','YYYY-MM-DD HH24:MI:SS'),100,'31116')
;
-- 26/08/2013 04:44:10 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:44:10','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000067,1000042,'N',100,TO_TIMESTAMP('2013-08-26 16:44:10','YYYY-MM-DD HH24:MI:SS'),100,'31117')
;
-- 26/08/2013 04:45:38 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:45:38','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000068,1000043,'N',100,TO_TIMESTAMP('2013-08-26 16:45:38','YYYY-MM-DD HH24:MI:SS'),100,'31118')
;
-- 26/08/2013 04:46:13 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:46:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000069,1000044,'N',100,TO_TIMESTAMP('2013-08-26 16:46:13','YYYY-MM-DD HH24:MI:SS'),100,'31119')
;
-- 26/08/2013 04:47:07 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:47:07','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',1000070,1000045,'N',100,TO_TIMESTAMP('2013-08-26 16:47:07','YYYY-MM-DD HH24:MI:SS'),100,'31120')
;
-- 26/08/2013 04:47:13 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM LVE_WH_Combination WHERE LVE_WH_Combination_ID=1000070
;
-- 26/08/2013 04:47:30 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:47:30','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000071,1000045,'N',100,TO_TIMESTAMP('2013-08-26 16:47:30','YYYY-MM-DD HH24:MI:SS'),100,'31120')
;
-- 26/08/2013 04:48:52 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:48:52','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000072,1000045,'N',100,TO_TIMESTAMP('2013-08-26 16:48:52','YYYY-MM-DD HH24:MI:SS'),100,'31121')
;
-- 26/08/2013 04:48:56 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM LVE_WH_Combination WHERE LVE_WH_Combination_ID=1000071
;
-- 26/08/2013 04:49:22 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:49:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000073,1000046,'N',100,TO_TIMESTAMP('2013-08-26 16:49:22','YYYY-MM-DD HH24:MI:SS'),100,'31120')
;
-- 26/08/2013 04:51:32 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:51:32','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000074,1000047,'N',100,TO_TIMESTAMP('2013-08-26 16:51:32','YYYY-MM-DD HH24:MI:SS'),100,'31122')
;
-- 26/08/2013 04:53:30 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:53:30','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000075,1000048,'N',100,TO_TIMESTAMP('2013-08-26 16:53:30','YYYY-MM-DD HH24:MI:SS'),100,'31123')
;
-- 26/08/2013 04:53:52 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:53:52','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000076,1000049,'N',100,TO_TIMESTAMP('2013-08-26 16:53:52','YYYY-MM-DD HH24:MI:SS'),100,'31124')
;
-- 26/08/2013 04:54:23 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:54:23','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000077,1000050,'N',100,TO_TIMESTAMP('2013-08-26 16:54:23','YYYY-MM-DD HH24:MI:SS'),100,'31125')
;
-- 26/08/2013 04:55:27 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:55:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000078,1000051,'N',100,TO_TIMESTAMP('2013-08-26 16:55:27','YYYY-MM-DD HH24:MI:SS'),100,'31126')
;
-- 26/08/2013 04:55:59 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:55:58','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000079,1000052,'N',100,TO_TIMESTAMP('2013-08-26 16:55:58','YYYY-MM-DD HH24:MI:SS'),100,'31127')
;
-- 26/08/2013 04:56:19 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 16:56:19','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000080,1000053,'N',100,TO_TIMESTAMP('2013-08-26 16:56:19','YYYY-MM-DD HH24:MI:SS'),100,'31128')
;
-- 26/08/2013 04:57:55 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,2.000000000000,TO_TIMESTAMP('2013-08-26 16:57:55','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000081,1000054,'N',100,TO_TIMESTAMP('2013-08-26 16:57:55','YYYY-MM-DD HH24:MI:SS'),100,'31311')
;
-- 26/08/2013 04:58:49 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,1.000000000000,TO_TIMESTAMP('2013-08-26 16:58:49','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000082,1000055,'N',100,TO_TIMESTAMP('2013-08-26 16:58:49','YYYY-MM-DD HH24:MI:SS'),100,'31312')
;
-- 26/08/2013 05:00:34 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,2.000000000000,TO_TIMESTAMP('2013-08-26 17:00:34','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000083,1000056,'N',100,TO_TIMESTAMP('2013-08-26 17:00:34','YYYY-MM-DD HH24:MI:SS'),100,'41011')
;
-- 26/08/2013 05:02:39 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM LVE_WH_Combination WHERE LVE_WH_Combination_ID=1000083
;
-- 26/08/2013 05:03:15 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:03:15','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000084,1000056,'N',100,TO_TIMESTAMP('2013-08-26 17:03:15','YYYY-MM-DD HH24:MI:SS'),100,'31313')
;
-- 26/08/2013 05:03:47 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,2.000000000000,TO_TIMESTAMP('2013-08-26 17:03:47','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000085,1000057,'N',100,TO_TIMESTAMP('2013-08-26 17:03:47','YYYY-MM-DD HH24:MI:SS'),100,'31411')
;
-- 26/08/2013 05:06:35 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:06:35','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000086,1000058,'N',100,TO_TIMESTAMP('2013-08-26 17:06:35','YYYY-MM-DD HH24:MI:SS'),100,'31412')
;
-- 26/08/2013 05:07:24 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000087,1000059,'N',100,TO_TIMESTAMP('2013-08-26 17:07:24','YYYY-MM-DD HH24:MI:SS'),100,'32111')
;
-- 26/08/2013 05:07:52 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:07:52','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000088,1000060,'N',100,TO_TIMESTAMP('2013-08-26 17:07:52','YYYY-MM-DD HH24:MI:SS'),100,'32112')
;
-- 26/08/2013 05:08:16 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:08:16','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000089,1000061,'N',100,TO_TIMESTAMP('2013-08-26 17:08:16','YYYY-MM-DD HH24:MI:SS'),100,'32113')
;
-- 26/08/2013 05:08:56 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:08:56','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000090,1000062,'N',100,TO_TIMESTAMP('2013-08-26 17:08:56','YYYY-MM-DD HH24:MI:SS'),100,'32114')
;
-- 26/08/2013 05:09:25 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:09:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000091,1000063,'N',100,TO_TIMESTAMP('2013-08-26 17:09:25','YYYY-MM-DD HH24:MI:SS'),100,'32115')
;
-- 26/08/2013 05:12:14 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.800000000000,TO_TIMESTAMP('2013-08-26 17:12:14','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000092,1000064,'N',100,TO_TIMESTAMP('2013-08-26 17:12:14','YYYY-MM-DD HH24:MI:SS'),100,'32116')
;
-- 26/08/2013 05:13:12 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:13:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000093,1000065,'N',100,TO_TIMESTAMP('2013-08-26 17:13:12','YYYY-MM-DD HH24:MI:SS'),100,'32118')
;
-- 26/08/2013 05:13:50 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,1.000000000000,TO_TIMESTAMP('2013-08-26 17:13:50','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000094,1000066,'N',100,TO_TIMESTAMP('2013-08-26 17:13:50','YYYY-MM-DD HH24:MI:SS'),100,'32118')
;
-- 26/08/2013 05:14:40 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM LVE_WH_Combination WHERE LVE_WH_Combination_ID=1000093
;
-- 26/08/2013 05:15:13 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,1.000000000000,TO_TIMESTAMP('2013-08-26 17:15:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000095,1000065,'N',100,TO_TIMESTAMP('2013-08-26 17:15:13','YYYY-MM-DD HH24:MI:SS'),100,'32117')
;
-- 26/08/2013 05:15:55 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,1.000000000000,TO_TIMESTAMP('2013-08-26 17:15:55','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000096,1000067,'N',100,TO_TIMESTAMP('2013-08-26 17:15:55','YYYY-MM-DD HH24:MI:SS'),100,'33111')
;
-- 26/08/2013 05:16:20 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:16:20','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000097,1000068,'N',100,TO_TIMESTAMP('2013-08-26 17:16:20','YYYY-MM-DD HH24:MI:SS'),100,'33112')
;
-- 26/08/2013 05:17:44 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:17:44','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000098,1000069,'N',100,TO_TIMESTAMP('2013-08-26 17:17:44','YYYY-MM-DD HH24:MI:SS'),100,'33211')
;
-- 26/08/2013 05:20:02 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:20:01','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000099,1000070,'N',100,TO_TIMESTAMP('2013-08-26 17:20:01','YYYY-MM-DD HH24:MI:SS'),100,'34111')
;
-- 26/08/2013 05:20:52 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:20:52','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000100,1000071,'N',100,TO_TIMESTAMP('2013-08-26 17:20:52','YYYY-MM-DD HH24:MI:SS'),100,'34211')
;
-- 26/08/2013 05:21:25 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,0.500000000000,TO_TIMESTAMP('2013-08-26 17:21:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000101,1000072,'N',100,TO_TIMESTAMP('2013-08-26 17:21:25','YYYY-MM-DD HH24:MI:SS'),100,'34212')
;
-- 26/08/2013 05:21:55 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,1.500000000000,TO_TIMESTAMP('2013-08-26 17:21:55','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000102,1000073,'N',100,TO_TIMESTAMP('2013-08-26 17:21:55','YYYY-MM-DD HH24:MI:SS'),100,'3511')
;
-- 26/08/2013 05:22:30 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,2.000000000000,TO_TIMESTAMP('2013-08-26 17:22:30','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000103,1000074,'N',100,TO_TIMESTAMP('2013-08-26 17:22:30','YYYY-MM-DD HH24:MI:SS'),100,'35211')
;
-- 26/08/2013 05:22:57 PM VET
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO LVE_WH_Combination (AD_Client_ID,AD_Org_ID,Aliquot,Created,CreatedBy,IsActive,IsManual,LVE_WH_Combination_ID,LVE_WH_Concept_ID,Processing,TaxBaseRate,Updated,UpdatedBy,Value) VALUES (11,0,1.000000000000,TO_TIMESTAMP('2013-08-26 17:22:57','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',1000104,1000075,'N',100,TO_TIMESTAMP('2013-08-26 17:22:57','YYYY-MM-DD HH24:MI:SS'),100,'35311')
;
|
CREATE TABLE BEHANDLING_SOKNADSINFO
(
ID BIGINT PRIMARY KEY,
FK_BEHANDLING_ID BIGINT REFERENCES BEHANDLING (ID) NOT NULL,
MOTTATT_DATO TIMESTAMP(3) 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)
);
CREATE SEQUENCE BEHANDLING_SOKNADSINFO_SEQ INCREMENT BY 50 START WITH 1000000 NO CYCLE;
CREATE INDEX ON BEHANDLING_SOKNADSINFO (FK_BEHANDLING_ID); |
delete from image;
insert into image values (1, 'filename.jpg', 'filename.jpg'); |
create or replace view cs041 as
(
select dwdm as de042,dwmc as de041,null as de043,
null as de046,null as de050,null as de051,null as de053,null as de055,null as de057,
null as de064,0 as jsde001,jbbs as jsde017,null as jsde901,null as lasttime,320581 as de022,null as de026
from xtdwb where ysnf = to_char(sysdate,'yyyy') and dwdm <'997' );
|
select *
from Event;
select *
from ORGANIZATION;
select *
from APPUSER;
select *
from Location; |
create or replace view v_fs_sfda as
select b.czde631,b.jsde955,a.DE322,a.de321,a.czde041,a.CZDE951,c.CZDE611,c.CZDE612,
b.JSDE689,b.JSDE901,b.JSDE687,b.CZDE028,b.jsde688,b.czde691,
b.JSDE992,b.JSDE993,b.JSDE684,b.JSDE999,b.CZDE048,
b.CZDE602,b.CZDE034,b.CZDE035,b.JSDE654,b.CZDE922,
b.JSDE960,b.CZDE921,b.CZDE630,b.DE022,b.czde607,b.CZDE600,b.CZDE601,b.CZDE067,b.JSDE697,b.de082
from CS321 a,FS001 b,PJ001 c
where a.de022 = b.de022
and a.de022 = c.de022
and a.czde631 = b.czde631
and b.CZDE607 = c.czde607
order by a.de022,b.jsde955,a.de322;
|
-- в выборе убираются песни, которые не были куплены ни разу
--жанры - трек - кол-во покупок
with popular as (
select g.name as g_name, t.name as t_name, sum(il.quantity) as quan
from genre as g
join track t on g.genre_id = t.genre_id
join invoice_line il on t.track_id = il.track_id
group by g.name, il.quantity, t.name
order by g.name,il.quantity, t.name
),
-- жанр - кол-во песен, которые покупали более одного раза
q1 as (
select popular.g_name as name, count(popular.quan) as cnt
from popular
group by popular.g_name
-- жанр-трек-процент покупки песни от q1
),
q2 as(
select popular.g_name, popular.t_name,
round((popular.quan::numeric/q1.cnt::numeric)*100, 2) as round_q2
from popular
join q1 on q1.name=popular.g_name
order by popular.g_name, round_q2 desc , popular.t_name
),
-- q2 и индексация
q3 as(
select *, rank() over(partition by q2.g_name order by q2.round_q2 desc, q2.t_name) as indc
from q2
order by q2.g_name, q2.round_q2 desc , q2.t_name
),
-- жанр-трек-процент с учетом предыдущего
q4 as (
select q3_s.g_name, q3_s.t_name, sum(q3_f.round_q2) as percent
from q3 as q3_f
join q3 as q3_s on q3_f.g_name=q3_s.g_name
and q3_f.indc <= q3_s.indc
group by q3_s.g_name, q3_s.t_name, q3_s.indc
order by q3_s.g_name, q3_s.indc
),
-- q4 только треки, входящие в 25% популярных
q5 as(
select q4.g_name,q4.t_name
from q4
where q4.percent <= 25
)
-- конечный вывод
select q5.t_name as track_name, q2.round_q2 as popularity
from q5
join q2 on q5.g_name=q2.g_name and q5.t_name=q2.t_name
|
CREATE DATABASE IF NOT EXISTS Aggregator;
Use Aggregator;
CREATE TABLE IF NOT EXISTS UserData (
UserID INT NOT NULL AUTO_INCREMENT,
Username VARCHAR(256) NOT NULL,
Password VARCHAR(256) NOT NULL,
DateCreated DATETIME NOT NULL,
LastLogin DATETIME NULL,
PRIMARY KEY(UserID)
);
CREATE TABLE IF NOT EXISTS Topic (
TopicID INT NOT NULL AUTO_INCREMENT,
TopicName VARCHAR(50),
PRIMARY KEY(TopicID)
);
CREATE TABLE IF NOT EXISTS UserTopic (
UserTopicID INT NOT NULL AUTO_INCREMENT,
UserID INT NOT NULL,
TopicID INT NOT NULL,
PRIMARY KEY(UserTopicID),
FOREIGN KEY (UserID) REFERENCES UserData (UserID),
FOREIGN KEY (TopicID) REFERENCES Topic (TopicID)
);
CREATE TABLE IF NOT EXISTS Article (
ArticleID INT NOT NULL AUTO_INCREMENT,
ArticleTitle VARCHAR(256) NULL,
ArticleAuthor VARCHAR(256) NULL,
DatePublished DATETIME NULL,
PRIMARY KEY (ArticleID)
);
CREATE TABLE IF NOT EXISTS UserArticle (
UserArticleID INT NOT NULL AUTO_INCREMENT,
UserID INT NOT NULL,
ArticleID INT NOT NULL,
IsSavedForLater BIT NOT NULL DEFAULT 0,
IsFavorited BIT NOT NULL DEFAULT 0,
PRIMARY KEY (UserArticleID),
FOREIGN KEY (UserID) REFERENCES UserData (UserID),
FOREIGN KEY (ArticleID) REFERENCES Article (ArticleID)
); |
CREATE TABLE city (
id INT auto_increment NOT NULL,
name varchar(100) NOT NULL,
state char(2) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE client (
id INT auto_increment NOT NULL,
name varchar(100) NOT NULL,
gender char(1) NULL,
birth DATE NULL,
city_id INT NULL,
CONSTRAINT FK_client_city FOREIGN KEY (city_id) REFERENCES city (id),
PRIMARY KEY (id)
); |
{{
config(
materialized='incremental',
unique_key='r_regionkey',
tags=['rpt', 'dim']
)
}}
select
r_regionkey,
r_name,
r_comment
from {{ ref('stg_region') }} |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 26 Jun 2020 pada 07.35
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.3.1
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: `beasiswa_pelajar`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `applied`
--
CREATE TABLE `applied` (
`id` int(11) NOT NULL,
`nama` varchar(225) NOT NULL,
`deskripsi` varchar(225) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `applied`
--
INSERT INTO `applied` (`id`, `nama`, `deskripsi`) VALUES
(1, 'Beasiswa Djarum', 'Beasiswa Covid guiss yaa eakkk hahah');
-- --------------------------------------------------------
--
-- Struktur dari tabel `beasiswa`
--
CREATE TABLE `beasiswa` (
`id` int(11) NOT NULL,
`nama` varchar(255) NOT NULL,
`deskripsi` varchar(500) NOT NULL,
`nominal` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `beasiswa`
--
INSERT INTO `beasiswa` (`id`, `nama`, `deskripsi`, `nominal`) VALUES
(1, 'Beasiswa Djarum', 'Beasiswa Covid guiss yaa eakkk hahah', 1200000),
(2, 'Beasiswa Covid', 'Beasiswa khusus mahasiswa ', 25000000);
-- --------------------------------------------------------
--
-- Struktur dari tabel `mahasiswa`
--
CREATE TABLE `mahasiswa` (
`email` varchar(225) NOT NULL,
`nama` varchar(225) NOT NULL,
`jurusan` varchar(225) NOT NULL,
`asal_univ` varchar(225) NOT NULL,
`alamat` varchar(225) NOT NULL,
`gender` varchar(225) NOT NULL,
`tempat_lahir` varchar(225) NOT NULL,
`tanggal_lahir` date NOT NULL,
`password` varchar(225) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `mahasiswa`
--
INSERT INTO `mahasiswa` (`email`, `nama`, `jurusan`, `asal_univ`, `alamat`, `gender`, `tempat_lahir`, `tanggal_lahir`, `password`) VALUES
('alvinsimbolon04@gmail.com', 'Alvin Immanuel Simbolon', 'D4 TRPL', 'IT Del', 'Medan', 'Male', 'Balige', '2000-06-14', '$2y$10$.rInkLtgNpTYJxtauNnRwOk62h1HrY3unpIQnZ2ZruHaYRl3I5IRe'),
('alvinsimbolon6@gmail.com', 'alvin', 'd4 trpl', 'Del', 'balige', 'pria', 'balige', '2000-06-14', '$2y$10$3DTkLSA6SrP7L7/W17p4XeacmFFkjJoboL1ptYhtU6Fmp4NXhbRlq');
-- --------------------------------------------------------
--
-- Struktur dari tabel `saved`
--
CREATE TABLE `saved` (
`id` int(11) NOT NULL,
`nama` varchar(225) NOT NULL,
`deskripsi` varchar(225) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `saved`
--
INSERT INTO `saved` (`id`, `nama`, `deskripsi`) VALUES
(1, 'Beasiswa Djarum', 'Beasiswa Covid guiss yaa eakkk hahah');
-- --------------------------------------------------------
--
-- Struktur dari tabel `user`
--
CREATE TABLE `user` (
`id` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`status` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `user`
--
INSERT INTO `user` (`id`, `username`, `password`, `status`) VALUES
(1, 'admin', 'admin', 'administrator');
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `applied`
--
ALTER TABLE `applied`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `beasiswa`
--
ALTER TABLE `beasiswa`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `mahasiswa`
--
ALTER TABLE `mahasiswa`
ADD PRIMARY KEY (`email`);
--
-- Indeks untuk tabel `saved`
--
ALTER TABLE `saved`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT untuk tabel yang dibuang
--
--
-- AUTO_INCREMENT untuk tabel `applied`
--
ALTER TABLE `applied`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT untuk tabel `beasiswa`
--
ALTER TABLE `beasiswa`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT untuk tabel `saved`
--
ALTER TABLE `saved`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT untuk tabel `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
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 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 30-05-2020 a las 06:32:06
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.5
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 */;
--
-- Base de datos: `biblioteca`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `libros`
--
CREATE TABLE `libros` (
`codigo` varchar(5) CHARACTER SET utf8 NOT NULL,
`titulo` varchar(50) CHARACTER SET utf8 NOT NULL,
`autor` varchar(50) CHARACTER SET utf8 NOT NULL,
`genero` varchar(50) CHARACTER SET utf8 NOT NULL,
`year` varchar(15) CHARACTER SET utf8 NOT NULL,
`fecha` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;
--
-- Volcado de datos para la tabla `libros`
--
INSERT INTO `libros` (`codigo`, `titulo`, `autor`, `genero`, `year`, `fecha`) VALUES
('1O3J3', 'Lazarillo de tormes', 'Anonimo', 'Novela', 'Desconocido', '2015-09-23 15:02:08'),
('23345', 'Libro cualquiera', 'Yo', 'Cualquiera', '2001', '2020-05-29 22:53:04'),
('F6DY7', 'Las venas abiertas de America Latina', 'Eduardo Galeano', 'Ensayo', '1971', '2015-09-23 15:22:10'),
('HQTSE', 'La catedral y el bazar', 'Eric S. Raymond', 'Novela', 'Desconocido', '2015-09-23 16:23:19'),
('P6SUY', 'Divina Comedia', 'Dante Alighieri', 'Poesía', '1472', '2015-09-23 23:28:52'),
('R1OVY', 'Yo Acuso', 'Emile Zola', 'Ensayo', '1898', '2015-09-24 00:57:38'),
('WZ9PV', 'Mas alla del bien y del mal', 'Friedrich Nietzsche', 'Filosofía', '1886', '2015-09-24 02:05:05');
-- --------------------------------------------------------
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `libros`
--
ALTER TABLE `libros`
ADD PRIMARY KEY (`codigo`);
/*!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 */;
|
Tubes PBD "First Class Shop";
create table Pelanggan(
Nomer_Identitas varchar2(10),
Nama_Pelanggan varchar2(20),
Nomer_Telepon varchar2(16),
Alamat_Pelanggan varchar2(50),
Primary key (Nomer_Identitas)
);
create table Shift(
Kode_Shift varchar2(10),
Periode_Awal DATE,
Perode_Akhir DATE,
Primary key (Shift)
);
create table pelayanan(
Id_Pelayanan varchar2(10),
Jenis_Pelayanan varchar2(10),
Total_Harga number,
Primary key (Id_Pelayanan)
);
create table Manager(
Id_Manager varchar2(10),
Nama_Manager varchar2(20),
Nomer_Telepon varchar2(15),
Primary key (Id_Manager)
);
create table Barang(
Id_Barang varchar2(10),
Jenis_Barang varchar2(10),
Nama_Barang varchar2(10),
Primary key (Id_Barang)
);
create table Alat(
Id_Alat varchar2 (10), --- perbaiki pk -----
Nama_Alat varchar2(10),
Jenis_Alat varchar2(10),
Waktu DATE,
Primary key (Id_Alat)
);
create table Kendaraan(
Nomer_Plat varchar2(10),
Nama_Kendaraan varchar2(10),
Jenis_Kendaraan varchar2(5),
Nomer_Identitas varchar2(20),
Primary key (Nomer_Plat),
constraint fk_Kendaraan Foreign key (Nomer_Identitas) references Pelanggan (Nomer_Identitas)
);
create table Membership(
Id_Member varchar2(10),
Nomer_Identitas varchar2(10)
Primary key (Id_Member),
constraint fk_Membership Foreign key (Nomer_Identitas) references Pelanggan (Nomer_Identitas)
);
create table Pegawai(
Id_Pegawai varchar2(10),
Nama_Pegawai varchar2(10),
Nomer_Telepon varchar2(10),
Id_Manager varchar2(10),
Id_Divisi varchar2(10),
Primary key (Id_Pegawai, Id_Divisi)
);
create table PJ_Barang (
Id_Pegawai varchar2(10),
Nama_PjBarang varchar2(20),
Nomer_Telepon varchar2(15),
Id_Divisi varchar2(10),
Primary key (Id_Pegawai, Id_Divisi),
constraint FK_PJ_Barang Foreign key (Id_Pegawai, Id_Divisi) references Pegawai (Id_Pegawai, Id_Divisi)
);
create table Kasir(
Id_Pegawai varchar2(10), --- perbaiki pknya ---
Nama_Kasir varchar2(20),
Nomer_Telepon varchar2(15),
Id_Divisi varchar2(10),
Primary key (Id_Pegawai, Id_Divisi),
constraint FK_Kasir Foreign key (Id_Pegawai, Id_Divisi) references Pegawai (Id_Pegawai, Id_Divisi)
);
create table Security(
Id_Pegawai varchar2(10),
Nama_Security varchar2(20),
Nomer_Telepon varchar2(15),
Id_Divisi varchar(10),
Primary key (Id_Pegawai, Id_Divisi),
constraint FK_Security Foreign key (Id_Pegawai, Id_Divisi) references Pegawai (Id_Pegawai, Id_Divisi)
);
create table montir(
Id_Pegawai varchar2(10), --- perbaiki pk nya ----
Nama_Montir varchar2(20),
Nomer_Telepon varchar2(15),
Id_Divisi varchar2(10),
Primary key (Id_Pegawai, Id_Divisi),
constraint FK_Montir Foreign key (Id_Pegawai, Id_Divisi) references Pegawai (Id_Pegawai, Id_Divisi)
);
create table Detil_Pelayanan(
Id_Pelayanan varchar2(10), ----- fk nya blm ditambahin
Id_Pegawai varchar2(10),
Nomer_Identitas varchar2(20),
constraint fk_Detil_Pelayanan Foreign key (Id_Pelayanan) references pelayanan (Id_Pelayanan),
constraint fk_Detil_Pelayanan Foreign key (Id_Pegawai) references Pegawai (ID_Pegawai),
constraint fk_Detil_Pelayanan Foreign key (Nomer_Identitas) references Pelanggan (Nomer_Identitas)
);
create table R_Memiliki(
Kode_Shift varchar2(10),
Id_Pegawai varchar2(10), -- fk blm dimasukkin
constraint fk_R_Memiliki Foreign key (Kode_Shift)
references Shift (Kode_Shift) on delete cascade enable,
constraint fk_R_Memiliki Foreign key (Id_Pegawai)
references Pegawai (Id_Pegawai) on delete cascade enable
);
create table Bertanggung_Jawab(
Id_Pegawai varchar2(10),
Id_Barang varchar2(10),
constraint Bertanggung_Jawab_FK Foreign key (Id_Pegawai)
references PJ_Barang (Id_Pegawai) on delete cascade enable,
constraint Bertanggung_Jawab_FK Foreign key (Id_Barang)
references Barang (Id_Barang) on delete cascade enable
);
create table R_Menggunakan(
Id_Alat varchar2(10),
Id_Pegawai varchar2(10),
Primary key (Id_Alat, Id_Pegawai) ENABLE,
constraint fk_R_Menggunakan Foreign key (Id_Alat)
references Alat (Id_Alat) On delete cascade enable,
constraint fk_R_Menggunakan Foreign key (Id_Pegawai)
references Montir (Id_Pegawai) on delete cascade
);
Alter table Montir
add Id_Montir varchar2(10);
alter table Montir
add Primary key (Id_Montir); |
/*
开票通知-产品资料
*/
delimiter $
drop trigger if exists Tgr_BillNotifiesLine_AftereInsert $
create trigger Tgr_BillNotifiesLine_AftereInsert after insert
on BillNotifiesLine
for each row
begin
call Proc_Shipments_SumBilledAmount(new.pid,new.PurchaseOrderNo,new.ItemNo,new.SOL_RecordID);-- 出运明细-采购明细-开票金额
end$
delimiter ; |
CREATE TABLE [Documents].[DocumentTemplatesPermissions] (
[DocumentTemplatesPermissionId] INT IDENTITY (1, 1) NOT NULL,
[DocumentTemplateId] INT NOT NULL,
[PermissionId] INT NOT NULL,
[CreatorId] INT NOT NULL,
[IsDeleted] BIT NOT NULL,
[CreationDate] DATETIME NOT NULL,
[DeletionDate] DATETIME NULL,
CONSTRAINT [PK_DocumentTemplatesPermissions] PRIMARY KEY CLUSTERED ([DocumentTemplatesPermissionId] ASC),
CONSTRAINT [FK_DocumentTemplatesPermissions_DocumentTemplates] FOREIGN KEY ([DocumentTemplateId]) REFERENCES [Documents].[DocumentTemplates] ([DocumentTemplateId]),
CONSTRAINT [FK_DocumentTemplatesPermissions_Permissions] FOREIGN KEY ([PermissionId]) REFERENCES [UserAccounts].[Permissions] ([PermissionId]),
CONSTRAINT [FK_DocumentTemplatesPermissions_UserAccount2] FOREIGN KEY ([CreatorId]) REFERENCES [UserAccounts].[UserAccounts] ([UserAccountId])
);
|
# patch_51_52_c.sql
#
# title: Add dna_align_feature.pair_dna_align_feature_id
#
# description:
# Add a pair_dna_align_feature_id to allow support for paired reads
ALTER TABLE dna_align_feature ADD COLUMN pair_dna_align_feature_id INT(10) UNSIGNED;
ALTER TABLE dna_align_feature ADD INDEX pair_idx (pair_dna_align_feature_id);
# patch identifier
INSERT INTO meta (species_id, meta_key, meta_value) VALUES (NULL, 'patch', 'patch_51_52_c.sql|pair_dna_align_feature_id');
|
-- ***********************************************************************************
-- Ejemplo Mysql con Java
-- ***********************************************************************************
-- Crear la base de datos
DROP DATABASE `ventas`;
CREATE SCHEMA `ventas` DEFAULT CHARACTER SET utf8 ;
USE ventas;
-- Crear usuario base de datos
DROP USER 'usuventas'@'localhost';
CREATE USER 'usuventas'@'localhost' IDENTIFIED BY 'passventas';
-- Dar privilegios
grant usage on *.* to usuventas@localhost identified by 'passventas';
grant all privileges on ventas.* to usuventas@localhost;
-- Crear tabla usuario
DROP TABLE usuario;
CREATE TABLE usuario(
idusuario INT NOT NULL AUTO_INCREMENT,
usuario VARCHAR(50),
clave VARCHAR(50),
nombre VARCHAR(100),
tipousuario VARCHAR(50),
estado VARCHAR(1),
PRIMARY KEY (idusuario)
);
-- insertar datos
INSERT INTO usuario (usuario, clave, nombre, tipousuario, estado) values
('admin','1234','Administrador','Alvaro Fuentes','V');
-- Permitir mysql operaciones update
SET SQL_SAFE_UPDATES = 0;
-- ***********************************************************************************
create table cliente(
codcliente int NOT NULL AUTO_INCREMENT,
nombrecliente varchar(100),
tipocliente varchar(10),
primary key(codcliente)
);
insert into cliente (nombrecliente, tipocliente)
values ('Alvaro Fuentes','vip');
insert into cliente (nombrecliente, tipocliente)
values ('Carla Gonzalez','normal');
create table producto(
codproducto int NOT NULL AUTO_INCREMENT,
producto varchar(100),
precio int(9),
stock int,
primary key (codproducto)
);
insert into producto (producto, precio, stock)
values ('Escritorio',150000, 100);
insert into producto (producto, precio, stock)
values ('Silla',55000, 50);
create table venta(
numdocumento int NOT NULL AUTO_INCREMENT,
fechadocumento date,
cantidad int,
codproducto int,
codcliente int,
totalventa int(9),
primary key (numdocumento)
);
-- Establecer relaciones entre las tablas
alter table venta add foreign key(codproducto) references producto(codproducto);
alter table venta add foreign key(codcliente) references cliente(codcliente);
|
CREATE Procedure Sp_PrintTransactionBySelection(
@FromDoc Decimal(18,6),
@ToDoc Decimal(18,6),
@Fromdate Datetime,
@Todate Datetime,
@TransType Int=0,
@Mode Int = 0,
@DocumentRef nvarchar(250)=N'')
As
/*
Mode = 0 Prnit By FromDoc No To ToDoc Number (DocumentRefernce)
Mode = 1 Print By FromSerial To ToSerial Number (DocumentID)
*/
If @TransType=1 /* GRN */
Begin
If @Mode=0
Begin
if Len(@DocumentRef)=0
Select GRNID, VoucherPrefix.Prefix + Cast(DocumentID as nvarchar)
From GRNAbstract, VoucherPrefix Where
((Case Isnumeric(DocumentReference)When 1 then Cast(DocumentReference as int)end)between @FromDoc And @ToDoc)
And GRNDate Between @FromDate And @todate
And (Isnull(GRNStatus,0) & 128) = 0
And VoucherPrefix.TranID = N'GOODS RECEIVED NOTE'
order by dbo.getTrueval(DocumentReference)
Else
Select GRNID, VoucherPrefix.Prefix + Cast(DocumentID as nvarchar)
From GRNAbstract,VoucherPrefix Where
DocumentReference LIKE @DocumentRef + N'%' + N'[0-9]'
And (Isnull(GRNStatus,0) & 128) = 0
And GRNDate Between @FromDate And @todate
And (CASE ISnumeric(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference)))
When 1 then Cast(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference))as int)End)
Between @FromDoc and @ToDoc
And VoucherPrefix.TranID = N'GOODS RECEIVED NOTE'
order by dbo.getTrueval(DocumentReference)
End
Else
Select GRNID, VoucherPrefix.Prefix + Cast(Documentid as nvarchar)
From GRNAbstract, VoucherPrefix Where
DocumentID Between Cast(@FromDoc as integer) And Cast(@ToDoc as Integer)
And GRNDate Between @FromDate And @todate
And (Isnull(GRNStatus,0) & 128) = 0
And VoucherPrefix.TranID = N'GOODS RECEIVED NOTE'
Order By DocumentID
End /* END GRN */
Else If @TransType=2 /* BILL */
Begin
If @Mode=0
Begin
if Len(@DocumentRef)=0
Select BillID, DocumentID
From BillAbstract Where
((Case Isnumeric(DocIDReference)When 1 then Cast(DocIDReference as int)end)between @FromDoc And @ToDoc)
And BillDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
order by dbo.getTrueval(DocIDReference)
Else
Select BillID, DocumentID
From BillAbstract Where
DocIDReference LIKE @DocumentRef + N'%' + N'[0-9]'
And (Isnull(Status,0) & 128) = 0
And BillDate Between @FromDate And @todate
And (CASE ISnumeric(Substring(DocIDReference,Len(@DocumentRef)+1,Len(DocIDReference)))
When 1 then Cast(Substring(DocIDReference,Len(@DocumentRef)+1,Len(DocIDReference))as int)End)
Between @FromDoc and @ToDoc
order by dbo.getTrueval(DocIDReference)
End
Else
Select BillID, Documentid
From BillAbstract Where
DocumentID Between Cast(@FromDoc as integer) And Cast(@ToDoc as Integer)
And BillDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
Order By DocumentID
End /* END BILL */
Else If @TransType=3 /* SALE CONFIRMATION */
Begin
If @Mode=0
Begin
if Len(@DocumentRef)=0
Select SONumber, VoucherPrefix.Prefix + Cast(DocumentID as nvarchar)
From SOAbstract, VoucherPrefix Where
((Case Isnumeric(DocumentReference)When 1 then Cast(DocumentReference as int)end)between @FromDoc And @ToDoc)
And SODate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
And VoucherPrefix.TranID = N'SALE CONFIRMATION'
order by dbo.getTrueval(DocumentReference)
Else
Select SONumber, VoucherPrefix.Prefix + Cast(DocumentID as nvarchar)
From SOAbstract,VoucherPrefix Where
DocumentReference LIKE @DocumentRef + N'%' + N'[0-9]'
And (Isnull(Status,0) & 128) = 0
And SODate Between @FromDate And @todate
And (CASE ISnumeric(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference)))
When 1 then Cast(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference))as int)End)
Between @FromDoc and @ToDoc
And VoucherPrefix.TranID = N'SALE CONFIRMATION'
order by dbo.getTrueval(DocumentReference)
End
Else
Select SONumber, VoucherPrefix.Prefix + Cast(Documentid as nvarchar)
From SOAbstract, VoucherPrefix Where
DocumentID Between Cast(@FromDoc as integer) And Cast(@ToDoc as Integer)
And SODate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
And VoucherPrefix.TranID = N'SALE CONFIRMATION'
Order By DocumentID
End /* END SALE CONFIRMATION */
Else If @TransType=4 /* DISPATCH */
Begin
If @Mode=0
Begin
if Len(@DocumentRef)=0
Select DispatchID, VoucherPrefix.Prefix + Cast(DocumentID as nvarchar)
From DispatchAbstract, VoucherPrefix Where
((Case Isnumeric(DocRef)When 1 then Cast(DocRef as int)end)between @FromDoc And @ToDoc)
And DispatchDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
And VoucherPrefix.TranID = N'DISPATCH'
order by dbo.getTrueval(DocRef)
Else
Select DispatchID, VoucherPrefix.Prefix + Cast(DocumentID as nvarchar)
From DispatchAbstract,VoucherPrefix Where
DocRef LIKE @DocumentRef + N'%' + N'[0-9]'
And (Isnull(Status,0) & 128) = 0
And DispatchDate Between @FromDate And @todate
And (CASE ISnumeric(Substring(DocRef,Len(@DocumentRef)+1,Len(DocRef)))
When 1 then Cast(Substring(DocRef,Len(@DocumentRef)+1,Len(DocRef))as int)End)
Between @FromDoc and @ToDoc
And VoucherPrefix.TranID = N'DISPATCH'
order by dbo.getTrueval(DocRef)
End
Else
Select DispatchID, VoucherPrefix.Prefix + Cast(Documentid as nvarchar)
From DispatchAbstract, VoucherPrefix Where
DocumentID Between Cast(@FromDoc as integer) And Cast(@ToDoc as Integer)
And DispatchDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
And VoucherPrefix.TranID = N'DISPATCH'
Order By DocumentID
End /* END DISPATCH */
Else If @TransType=5 /* INVOICE */
Begin
If @Mode=0
Begin
if Len(@DocumentRef)=0
Select InvoiceID, VoucherPrefix.Prefix + Cast(DocumentID as nvarchar)
From InvoiceAbstract, VoucherPrefix Where
((Case Isnumeric(DocReference)When 1 then Cast(DocReference as int)end)between @FromDoc And @ToDoc)
And InvoiceDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
And InvoiceType in (1, 3)
And VoucherPrefix.TranID = N'INVOICE'
order by dbo.getTrueval(DocReference)
Else
Select InvoiceID, VoucherPrefix.Prefix + Cast(DocumentID as nvarchar)
From InvoiceAbstract,VoucherPrefix Where
DocReference LIKE @DocumentRef + N'%' + N'[0-9]'
And (Isnull(Status,0) & 128) = 0
And InvoiceDate Between @FromDate And @todate
And (CASE ISnumeric(Substring(DocReference,Len(@DocumentRef)+1,Len(DocReference)))
When 1 then Cast(Substring(DocReference,Len(@DocumentRef)+1,Len(DocReference))as int)End)
Between @FromDoc and @ToDoc
And InvoiceType in (1, 3)
And VoucherPrefix.TranID = N'INVOICE'
order by dbo.getTrueval(DocReference)
End
Else
Select InvoiceID, VoucherPrefix.Prefix + Cast(Documentid as nvarchar)
From InvoiceAbstract, VoucherPrefix Where
DocumentID Between Cast(@FromDoc as integer) And Cast(@ToDoc as Integer)
And InvoiceDate Between @FromDate And @todate
And InvoiceType in (1, 3)
And (Isnull(Status,0) & 128) = 0
And VoucherPrefix.TranID = N'INVOICE'
Order By DocumentID
End /* END INVOICE */
Else If @TransType=6 /* RETAIL INVOICE */
Begin
If @Mode=0
Begin
if Len(@DocumentRef)=0
Select InvoiceID, VoucherPrefix.Prefix + Cast(DocumentID as nvarchar)
From InvoiceAbstract, VoucherPrefix Where
((Case Isnumeric(DocReference)When 1 then Cast(DocReference as int)end)between @FromDoc And @ToDoc)
And InvoiceDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
And InvoiceType =2
And VoucherPrefix.TranID = N'RETAIL INVOICE'
order by dbo.getTrueval(DocReference)
Else
Select InvoiceID, VoucherPrefix.Prefix + Cast(DocumentID as nvarchar)
From InvoiceAbstract,VoucherPrefix Where
DocReference LIKE @DocumentRef + N'%' + N'[0-9]'
And (Isnull(Status,0) & 128) = 0
And InvoiceDate Between @FromDate And @todate
And (CASE ISnumeric(Substring(DocReference,Len(@DocumentRef)+1,Len(DocReference)))
When 1 then Cast(Substring(DocReference,Len(@DocumentRef)+1,Len(DocReference))as int)End)
Between @FromDoc and @ToDoc
And InvoiceType =2
And VoucherPrefix.TranID = N'RETAIL INVOICE'
order by dbo.getTrueval(DocReference)
End
Else
Select InvoiceID, VoucherPrefix.Prefix + Cast(Documentid as nvarchar)
From InvoiceAbstract, VoucherPrefix Where
DocumentID Between Cast(@FromDoc as integer) And Cast(@ToDoc as Integer)
And InvoiceDate Between @FromDate And @todate
And InvoiceType=2
And (Isnull(Status,0) & 128) = 0
And VoucherPrefix.TranID = N'RETAIL INVOICE'
Order By DocumentID
End /* END RETAIL INVOICE */
Else If @TransType=7 /* CREDIT NOTE */
Begin
If @Mode=0
Begin
if Len(@DocumentRef)=0
Select CreditID,CustomerID,VoucherPrefix.Prefix + Cast(Documentid as nvarchar)
From CreditNote, VoucherPrefix Where
((Case Isnumeric(DocumentReference)When 1 then Cast(DocumentReference as int)end)between @FromDoc And @ToDoc)
And DocumentDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
And VoucherPrefix.TranID = N'CREDIT NOTE'
order by dbo.getTrueval(DocumentReference)
Else
Select CreditID,CustomerID,VoucherPrefix.Prefix + Cast(Documentid as nvarchar)
From CreditNote, VoucherPrefix Where
DocumentReference LIKE @DocumentRef + N'%' + N'[0-9]'
And (Isnull(Status,0) & 128) = 0
And DocumentDate Between @FromDate And @todate
And (CASE ISnumeric(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference)))
When 1 then Cast(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference))as int)End)
Between @FromDoc and @ToDoc
And VoucherPrefix.TranID = N'CREDIT NOTE'
order by dbo.getTrueval(DocumentReference)
End
Else
Select CreditID,CustomerID,VoucherPrefix.Prefix + Cast(Documentid as nvarchar)
From CreditNote, VoucherPrefix Where
DocumentID Between Cast(@FromDoc as integer) And Cast(@ToDoc as Integer)
And DocumentDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
And VoucherPrefix.TranID = N'CREDIT NOTE'
Order By DocumentID
End /* END CREDIT NOTE */
Else If @TransType=8 /* DEBIT NOTE */
Begin
If @Mode=0
Begin
if Len(@DocumentRef)=0
Select DebitID,CustomerID,VoucherPrefix.Prefix + Cast(Documentid as nvarchar)
From DebitNote, VoucherPrefix Where
((Case Isnumeric(DocumentReference)When 1 then Cast(DocumentReference as int)end)between @FromDoc And @ToDoc)
And DocumentDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
And VoucherPrefix.TranID = N'DEBIT NOTE'
order by dbo.getTrueval(DocumentReference)
Else
Select DebitID,CustomerID,VoucherPrefix.Prefix + Cast(Documentid as nvarchar)
From DebitNote, VoucherPrefix Where
DocumentReference LIKE @DocumentRef + N'%' + N'[0-9]'
And (Isnull(Status,0) & 128) = 0
And DocumentDate Between @FromDate And @todate
And (CASE ISnumeric(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference)))
When 1 then Cast(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference))as int)End)
Between @FromDoc and @ToDoc
And VoucherPrefix.TranID = N'DEBIT NOTE'
order by dbo.getTrueval(DocumentReference)
End
Else
Select DebitID,CustomerID,VoucherPrefix.Prefix + Cast(Documentid as nvarchar)
From DebitNote, VoucherPrefix Where
DocumentID Between Cast(@FromDoc as integer) And Cast(@ToDoc as Integer)
And DocumentDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
And VoucherPrefix.TranID = N'DEBIT NOTE'
Order By DocumentID
End /* END DEBIT NOTE */
Else If @TransType=9 /* COLLECTION */
Begin
If @Mode=0
Begin
if Len(@DocumentRef)=0
Select DocumentID,FullDocID From Collections Where
((Case Isnumeric(DocumentReference)When 1 then Cast(DocumentReference as int)end)between @FromDoc And @ToDoc)
And DocumentDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
order by dbo.getTrueval(DocumentReference)
Else
Select DocumentID,FullDocID From Collections Where
DocumentReference LIKE @DocumentRef + N'%' + N'[0-9]'
And (Isnull(Status,0) & 128) = 0
And DocumentDate Between @FromDate And @todate
And (CASE ISnumeric(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference)))
When 1 then Cast(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference))as int)End)
Between @FromDoc and @ToDoc
order by dbo.getTrueval(DocumentReference)
End
Else
Select DocumentID,FullDocID From Collections Where
dbo.GetTrueVal(FullDocID) Between Cast(@FromDoc as integer) And Cast(@ToDoc as Integer)
And DocumentDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
Order By dbo.GetTrueVal(FullDocID)
End /* END COLLECTION */
Else If @TransType=10 /* PAYMENT */
Begin
If @Mode=0
Begin
if Len(@DocumentRef)=0
Select DocumentID,FullDocID From Payments Where
((Case Isnumeric(DocumentReference)When 1 then Cast(DocumentReference as int)end)between @FromDoc And @ToDoc)
And DocumentDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
order by dbo.getTrueval(DocumentReference)
Else
Select DocumentID,FullDocID From Payments Where
DocumentReference LIKE @DocumentRef + N'%' + N'[0-9]'
And (Isnull(Status,0) & 128) = 0
And DocumentDate Between @FromDate And @todate
And (CASE ISnumeric(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference)))
When 1 then Cast(Substring(DocumentReference,Len(@DocumentRef)+1,Len(DocumentReference))as int)End)
Between @FromDoc and @ToDoc
order by dbo.getTrueval(DocumentReference)
End
Else
Select DocumentID,FullDocID From Payments Where
dbo.GetTrueVal(FullDocID) Between Cast(@FromDoc as integer) And Cast(@ToDoc as Integer)
And DocumentDate Between @FromDate And @todate
And (Isnull(Status,0) & 128) = 0
Order By dbo.GetTrueVal(FullDocID)
End /* END PAYMENT */
|
create table category(
id IDENTITY,
name varchar(50),
description varchar(255),
image_url varchar(50),
is_active boolean,
constraint pk_category_id primary key (id)
);
//user detail table
CREATE TABLE `onlineshopping`.`user_detail` (
`id` INT NOT NULL AUTO_INCREMENT,
`first_name` VARCHAR(45) NULL,
`last_name` VARCHAR(45) NULL,
`role` VARCHAR(45) NULL,
`enabled` TINYINT(1) NULL,
`password` VARCHAR(45) NULL,
`email` VARCHAR(100) NULL,
`contact_number` VARCHAR(15) NULL,
`user_detailcol` VARCHAR(45) NULL,
PRIMARY KEY (`id`));
INSERT INTO `onlineshopping`.`user_detail`
(`first_name`, `last_name`, `role`, `enabled`, `password`, `email`, `contact_number`)
VALUES ('virat', 'Kohli', 'admin', '1', '888888', 'vk@gmail.com', '8888888888');
CREATE TABLE `onlineshopping`.`product` (`id` INT NOT NULL AUTO_INCREMENT,`code` VARCHAR(20) NULL,
`name` VARCHAR(45) NULL,`brand` VARCHAR(45) NULL,`description` VARCHAR(255) NULL,`unit_price` DECIMAL(10,2) NULL,
`quantity` INT NULL,
`is_active` TINYINT(1) NULL,
`category_id` INT NULL,
`supplier_id` INT NULL,
`purchase` INT NULL DEFAULT 0,
`views` INT NULL DEFAULT 0,
PRIMARY KEY (`id`),
CONSTRAINT `fk_product_category_id`
FOREIGN KEY (`id`)
REFERENCES `onlineshopping`.`category` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_product_supplier_id`
FOREIGN KEY (`id`)
REFERENCES `onlineshopping`.`user_detail` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
COMMENT = ' ';
|
create or replace function GetComplainResult(complain_result string,oper_result string)
RETURN varchar2 is
Result varchar2(256);
begin
Result:=null;
if complain_result is null then
if instr(oper_result,'已解决_网络质量',1,1)>0 then
Result:='已解决_网络质量';
elsif instr(oper_result,'已解决_用户原因',1,1)>0 then
Result:='已解决_用户原因';
elsif instr(oper_result,'已解决_能力受限',1,1)>0 then
Result:='已解决_能力受限';
elsif instr(oper_result,'已解决_工程入网',1,1)>0 then
Result:='已解决_工程入网';
elsif instr(oper_result,'已解决_设备原因',1,1)>0 then
Result:='已解决_设备原因';
elsif instr(oper_result,'已解决_其它',1,1)>0 then
Result:='已解决_其它';
elsif instr(oper_result,'已处理_需工程解决',1,1)>0 then
Result:='已处理_需工程解决';
elsif instr(oper_result,'已处理_需优化解决',1,1)>0 then
Result:='已处理_需优化解决';
elsif instr(oper_result,'已处理_需扩容解决',1,1)>0 then
Result:='已处理_需扩容解决';
elsif instr(oper_result,'已处理_设备原因',1,1)>0 then
Result:='已处理_设备原因';
elsif instr(oper_result,'已处理_用户原因',1,1)>0 then
Result:='已处理_用户原因';
elsif instr(oper_result,'已处理_无确切解决时间',1,1)>0 then
Result:='已处理_无确切解决时间';
elsif instr(oper_result,'已处理_其它',1,1)>0 then
Result:='已处理_其它';
elsif instr(oper_result,'已处理_设备故障',1,1)>0 then
Result:='已处理_设备故障';
elsif instr(oper_result,'已解决_设备故障',1,1)>0 then
Result:='已解决_设备故障';
elsif instr(oper_result,'已处理_需现场查看',1,1)>0 then
Result:='已处理_需现场查看';
else
Result:='无';
end if;
else
Result:=complain_result;
end if;
return(Result);
end GetComplainResult;
|
Select count(*) as total from flights;
Select origin, avg(ArrDelay) as avg_arrDelay, avg(DepDelay) as avg_depDelay from flights
Group by Origin;
Select origin,
colyear,
colMonth,
avg(ArrDelay) as avg_arrDelay
from flights
group by origin,
colyear,
colmonth
order by Origin, colyear, colmonth;
Select city,
colyear,
colMonth,
avg(ArrDelay) as avg_arrDelay
from flights
join usairports on usairports.iata = flights.origin
group by city,
colyear,
colmonth
order by City, colyear, colmonth;
select uniquecarrier, colyear, colMonth, sum(cancelled) as total_cancelled
from flights
group by UniqueCarrier,
colyear,
colMonth
order by total_cancelled desc;
select TailNum, sum(Distance) as total_distance
from usairlineflights2.flights
group by TailNum
order by total_distance desc
Limit 10;
select uniquecarrier, avg(ArrDelay) as avg_arrDelay
from flights
where arrDelay >10
group by UniqueCarrier
order by avg_arrDelay desc
; |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Tempo de geração: 27-Ago-2021 às 15:19
-- Versão do servidor: 8.0.21
-- versão do PHP: 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 */;
--
-- Banco de dados: `celke`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `usuarios`
--
DROP TABLE IF EXISTS `usuarios`;
CREATE TABLE IF NOT EXISTS `usuarios` (
`id` int NOT NULL AUTO_INCREMENT,
`nome` varchar(220) COLLATE utf8mb4_unicode_ci NOT NULL,
`usuario` varchar(220) COLLATE utf8mb4_unicode_ci NOT NULL,
`senha_usuario` varchar(220) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Extraindo dados da tabela `usuarios`
--
INSERT INTO `usuarios` (`id`, `nome`, `usuario`, `senha_usuario`) VALUES
(1, 'Cesar', 'cesar@celke.com.br', '$2y$10$h8ZgUrhzl9mOY3pjhBJNs.Mna5tmXAGsn35aitbvAwreVtHWHDE6u');
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 */;
|
USE project_ensf_607_608;
SELECT * FROM CUSTOMER;
SELECT * FROM TOOL;
SELECT * FROM SUPPLIER;
SELECT * FROM PURCHASES;
SELECT * FROM TOOLSORDER;
SELECT * FROM ORDERLINE;
-- (2) BASIC RETRIEVAL:
-- Retrieve the first name, last name, and address of the customers with the last name 'Smith'
SELECT FName, LName, Address FROM CUSTOMER WHERE LName = 'Smith';
-- (3) RETRIEVAL WITH ORDERED RESULTS:
-- Retrieve the tool id, name, and price of 'Non-Electrical' tools ordered by price (ascending)
SELECT ToolId, Name, Price
FROM TOOL
WHERE Type = 'Non-Electrical'
ORDER BY Price;
-- (4) USING NESTED QUERIES: (most complex nested query I can think of)
-- Retrieve the first and last name of customers who purchased items from supplier 'Grab Bag Inc.'
SELECT Fname, Lname
FROM CUSTOMER
WHERE CustomerId IN
(SELECT CustomerId
FROM PURCHASES
WHERE ToolId IN
(SELECT ToolId
FROM TOOL
WHERE SupplierId IN
(SELECT SupplierId
FROM SUPPLIER
WHERE Name = 'Grab Bag Inc.')));
SELECT C.Fname, C.Lname, P.*
FROM CUSTOMER AS C JOIN PURCHASES AS P
ON C.CustomerId=P.CustomerId;
-- (5) USING JOINED TABLES:
-- Retrieve Tool name, power type, and quantity of all electrical tools
SELECT T.Name, E.PowerType, T.Quantity
FROM ELECTRICAL AS E JOIN TOOL AS T
ON E.ToolId = T.ToolId;
-- (6) UPDATE OPERATION:
-- Update tool order with order id from 10000 to 12345
SELECT * FROM TOOLSORDER WHERE OrderId = 10000;
SELECT * FROM ORDERLINE WHERE OrderId; -- recall trigger: on update cascade
UPDATE TOOLSORDER SET OrderId = 12345 WHERE OrderId = 10000;
SELECT * FROM TOOLSORDER WHERE OrderId = 10000 OR OrderId = 12345;
SELECT * FROM ORDERLINE;
-- UPDATE TOOLSORDER SET OrderId = 10000 WHERE OrderId = 12345;
-- (7) DELETE OPERATION:
-- Delete tool with tool id 1040
SELECT * FROM TOOL WHERE ToolId = 1040; -- Electrical type
SELECT * FROM ELECTRICAL WHERE ToolId = 1040; -- recall trigger: on delete cascade
DELETE FROM TOOL WHERE TOOLId = 1040;
-- INSERT INTO TOOL VALUES (1040, 'Inny Outies', 'Electrical', 219, 3.45, 8010);
-- INSERT INTO ELECTRICAL VALUES (1040, '250 W');
|
create table staff
(
id varchar(20),
fullname varchar(20),
email varchar(100),
username varchar(20),
hash varchar(100),
SID varchar(10) unique not null,
check (SID like 'S%'),
primary key (id)
);
create table NhanVien
(
SID varchar(10),
Email varchar(100),
HoTen varchar(50),
primary key (SID),
foreign key (SID) references staff (SID) on delete cascade on update cascade
);
create table Kho
(
MaKho varchar(20),
primary key (MaKho)
);
create table NhaXuatBan
(
TenNhaXuatBan varchar(30),
primary key (TenNhaXuatBan)
);
create table TacGia
(
AID varchar(10),
HoTen varchar(50),
Email varchar(30),
NamSinh int,
primary key (AID),
check (AID like 'A%'),
check (NamSinh > 0 AND NamSinh < 9999)
);
create table Sach
(
ISBN varchar(10),
TenSach varchar(30),
GiaTien int not null,
primary key (ISBN),
check (GiaTien > 0)
);
create table BanIn
(
ISBN varchar(10),
primary key (ISBN),
foreign key (ISBN) references Sach (ISBN) on delete cascade on update cascade
);
create table BanDienTu
(
ISBN varchar(10),
Bcode varchar(20) unique not null,
primary key (ISBN),
foreign key (ISBN) references Sach (ISBN) on delete cascade on update cascade
);
create table user
(
id varchar(20),
fullname varchar(20),
email varchar(100),
username varchar(20),
hash varchar(100),
UID varchar(20) unique not null Check (uid like 'U%'),
primary key (id)
);
create table KhachHang
(
UID varchar(10),
HoTen varchar(50),
DiaChi varchar(30),
Phone varchar(11),
primary key (UID),
foreign key (UID) references user (UID) on delete cascade on update cascade,
check (length(Phone) >= 9 AND length(Phone) <= 11)
);
create table TheTinDung
(
MaThe varchar(10),
TenChuThe varchar(20),
TenNganHang varchar(20),
NgayHetHan date,
primary key (MaThe)
);
create table ThanhToan
(
HoaDon varchar(20),
TrangThai varchar(20) default ('chưa thanh toán'),
check (TrangThai in ('thành công', 'chưa thanh toán', 'lỗi')),
primary key (HoaDon)
);
create table ChuyenKhoan
(
HoaDon varchar(20),
primary key (HoaDon),
foreign key (HoaDon) references ThanhToan (HoaDon) on delete cascade on update cascade
);
create table ThanhToanThe
(
HoaDon varchar(20),
MaThanhToan varchar(10) unique not null,
primary key (HoaDon),
foreign key (HoaDon) references ThanhToan (HoaDon) on delete cascade on update cascade
);
create table GiaoDich
(
UID varchar(10),
ISBN varchar(10),
NgayGio datetime,
Loai varchar(10) not null,
check (Loai in ('mua', 'thuê')),
LoaiSach varchar(20) not null,
check (LoaiSach in ('bản điện tử', 'bản in')),
SoLuong int default (1),
HoaDon varchar(20),
check (SoLuong > 0),
primary key (UID, ISBN, NgayGio),
foreign key (HoaDon) references ThanhToan (HoaDon) on delete cascade on update cascade;
foreign key (UID) references KhachHang (UID) on delete cascade on update cascade,
foreign key (ISBN) references Sach (ISBN) on delete cascade on update cascade
);
create table LuuTru
(
MaKho varchar(20),
ISBN char(13),
SoLuongBanIn int,
primary key (MaKho, ISBN),
foreign key (Makho) references Kho (MaKho) on delete cascade on update cascade,
foreign key (ISBN) references BanIn (ISBN) on delete cascade on update cascade,
check (SoLuongBanIn >= 0)
);
create table QuanLy
(
MaKho varchar(20),
SID varchar(10),
ISBN char(13),
primary key (MaKho, SID, ISBN),
foreign key (MaKho) references Kho (MaKho) on delete cascade on update cascade,
foreign key (SID) references NhanVien (SID) on delete cascade on update cascade,
foreign key (ISBN) references BanIn (ISBN) on delete cascade on update cascade
);
create table Viet
(
AID varchar(10),
ISBN varchar(10),
primary key (AID, ISBN),
foreign key (AID) references TacGia (AID) on delete cascade on update cascade,
foreign key (ISBN) references Sach (ISBN) on delete cascade on update cascade
);
create table PhanHoi
(
UID varchar(10),
ISBN varchar(10),
primary key (UID, ISBN),
foreign key (UID) references KhachHang (UID) on delete cascade on update cascade,
foreign key (ISBN) references Sach (ISBN) on delete cascade on update cascade
);
create table TuKhoa
(
ISBN varchar(10),
ATuKhoa varchar(20),
primary key (ISBN, ATuKhoa),
foreign key (ISBN) references Sach (ISBN) on delete cascade on update cascade
);
create table LinhVuc
(
ISBN varchar(10),
ALinhVuc varchar(20),
primary key (ISBN, ALinhVuc),
foreign key (ISBN) references Sach (ISBN) on delete cascade on update cascade
);
create table NamSanXuat
(
ISBN varchar(10),
TenNhaXuatBan varchar(30),
ANamSanXuat int,
primary key (ISBN, TenNhaXuatBan, ANamSanxuat),
foreign key (ISBN) references Sach (ISBN) on delete cascade on update cascade,
foreign key (TenNhaXuatBan) references NhaXuatBan (TenNhaXuatBan) on delete cascade on update cascade,
check (ANamSanXuat > 0 AND ANamSanXuat < 9999)
);
create table TinPhanHoi
(
UID varchar(10),
ISBN varchar(10),
ThoiGian date,
VanBan varchar(500),
primary key (UID, ISBN, ThoiGian, VanBan),
foreign key (UID, ISBN) references PhanHoi (UID, ISBN) on delete cascade on update cascade
);
create table cart_4customer
(
UID varchar(10),
isbn varchar(10),
soluong int,
mahoadon varchar(20),
Loai varchar(10) not null,
check (Loai in ('mua', 'thuê')),
LoaiSach varchar(20) not null,
check (LoaiSach in ('bản điện tử', 'bản in')),
tien int,
primary key (uid, isbn, mahoadon),
foreign key (mahoadon) references ThanhToan (HoaDon) on delete cascade on update cascade,
foreign key (isbn) references Sach (ISBN) on delete cascade on update cascade,
foreign key (uid) references KhachHang (uid) on delete cascade on update cascade
);
create table cart_4staff
(
UID varchar(10),
isbn varchar(10),
soluong int,
mahoadon varchar(20),
tien int,
Loai varchar(10) not null,
check (Loai in ('mua', 'thuê')),
LoaiSach varchar(20) not null,
check (LoaiSach in ('bản điện tử', 'bản in')),
primary key (uid, isbn, mahoadon),
foreign key (mahoadon) references ThanhToan (HoaDon) on delete cascade on update cascade,
foreign key (isbn) references Sach (ISBN) on delete cascade on update cascade,
foreign key (uid) references KhachHang (uid) on delete cascade on update cascade
); |
select title, author_lanme from books;
select count(*) from books group by author_lanme;
select title, author_lanme from books group by author_lanme;
select author_lanme, count(*) from books group by author_lanme;
select title , author_lanme, author_fname from books;
select title, author_lanme, author_fname from books group by author_fname;
select title, author_fname, author_lanme, count(*) from books group by author_lanme, author_fname;
select title, year, count(*) from books group by year;
|
-- USE chatbot;
DROP TABLE IF EXISTS split_queries;
DROP TABLE IF EXISTS queries;
DROP TABLE IF EXISTS words;
DROP TABLE IF EXISTS split_inputs;
DROP TABLE IF EXISTS inputs;
DROP TABLE IF EXISTS actions;
DROP TABLE IF EXISTS outputs;
DROP TABLE IF EXISTS rules;
DROP TABLE IF EXISTS topics_chatbots;
DROP TABLE IF EXISTS topics;
DROP TABLE IF EXISTS chatbots;
DROP TABLE IF EXISTS sm_actions_rules;
DROP TABLE IF EXISTS sm_actions;
DROP TABLE IF EXISTS sm_conditions;
DROP TABLE IF EXISTS sm_rules;
DROP TABLE IF EXISTS sm_variables;
DROP TABLE IF EXISTS sm_state_machines;
DROP TABLE IF EXISTS sm_memory;
CREATE TABLE IF NOT EXISTS topics (
id INT(19) NOT NULL AUTO_INCREMENT,
topic_name VARCHAR(255) NOT NULL,
rank INT(11),
PRIMARY KEY (id),
CONSTRAINT uc_TopicName UNIQUE (topic_name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE INDEX index_topic_name ON topics(topic_name) USING BTREE;
CREATE TABLE IF NOT EXISTS rules (
id INT(19) NOT NULL AUTO_INCREMENT,
topic_id INT(19),
rule_name VARCHAR(255) NOT NULL,
rank INT(11),
response VARCHAR(255),
PRIMARY KEY (id),
FOREIGN KEY (topic_id)
REFERENCES topics(id),
CONSTRAINT uc_RuleName UNIQUE (topic_id, rule_name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS inputs (
id INT(19) NOT NULL AUTO_INCREMENT,
rule_id INT(19),
input_text TEXT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (rule_id)
REFERENCES rules(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS outputs (
id INT(19) NOT NULL AUTO_INCREMENT,
rule_id INT(19),
output_text TEXT NOT NULL,
request VARCHAR(255),
PRIMARY KEY (id),
FOREIGN KEY (rule_id)
REFERENCES rules(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS actions (
id INT(19) NOT NULL AUTO_INCREMENT,
rule_id INT(19),
action_body TEXT NOT NULL,
priority INT(19),
PRIMARY KEY (id),
FOREIGN KEY (rule_id)
REFERENCES rules(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS split_inputs (
id INT(19) NOT NULL AUTO_INCREMENT,
input_id INT(19) NOT NULL,
prev_word varchar(255),
word varchar(255) NOT NULL,
next_word varchar(255),
PRIMARY KEY (id),
FOREIGN KEY (input_id)
REFERENCES inputs(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE INDEX index_InputID ON split_inputs(input_id) USING BTREE;
CREATE INDEX index_word ON split_inputs(word) USING BTREE;
CREATE INDEX index_word_triplet ON split_inputs(prev_word, word, next_word) USING BTREE;
CREATE TABLE IF NOT EXISTS queries (
id INT(19) NOT NULL AUTO_INCREMENT,
query_text TEXT NOT NULL,
session_id varchar(255),
chatbot_name varchar(255),
event_date timestamp,
response TEXT,
actions TEXT,
request VARCHAR(255),
rule_id INT(19),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE INDEX index_session_chatbot ON queries(session_id, chatbot_name) USING BTREE;
CREATE TABLE IF NOT EXISTS split_queries (
id INT(19) NOT NULL AUTO_INCREMENT,
query_id INT(19),
prev_word varchar(255),
word varchar(255),
next_word varchar(255),
PRIMARY KEY (id),
FOREIGN KEY (query_id)
REFERENCES queries(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS words (
id INT(19) NOT NULL AUTO_INCREMENT,
syn_to_id INT(19),
word varchar(255),
PRIMARY KEY (id),
FOREIGN KEY (syn_to_id)
REFERENCES words(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS chatbots (
id INT(19) NOT NULL AUTO_INCREMENT,
chatbot_name VARCHAR(255) NOT NULL,
PRIMARY KEY (id),
CONSTRAINT uc_ChatbotName UNIQUE (chatbot_name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS topics_chatbots (
id INT(19) NOT NULL AUTO_INCREMENT,
topic_id INT(19) NOT NULL,
chatbot_id INT(19) NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (topic_id)
REFERENCES topics(id),
FOREIGN KEY (chatbot_id)
REFERENCES chatbots(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS state_machines (
id int(19) NOT NULL AUTO_INCREMENT,
state_machine_name varchar(255) NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY uc_StateMachineName (state_machine_name),
KEY index_state_machine_name (state_machine_name) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE sm_actions (
id int(19) NOT NULL AUTO_INCREMENT,
state_machine_id int(19) NOT NULL,
sm_action_name varchar(255) NOT NULL,
action_text text NOT NULL,
PRIMARY KEY ( id ),
UNIQUE KEY uc_SMActionName ( state_machine_id , sm_action_name ),
CONSTRAINT sm_actions_ibfk_1 FOREIGN KEY ( state_machine_id ) REFERENCES state_machines ( id )
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE sm_rules (
id int(19) NOT NULL AUTO_INCREMENT,
state_machine_id int(19) NOT NULL,
sm_rule_name varchar(255) NOT NULL,
PRIMARY KEY ( id ),
UNIQUE KEY uc_SMRuleName ( state_machine_id , sm_rule_name ),
CONSTRAINT sm_rules_ibfk_1 FOREIGN KEY ( state_machine_id ) REFERENCES state_machines ( id )
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE sm_actions_rules (
id int(19) NOT NULL AUTO_INCREMENT,
sm_rule_id int(19) NOT NULL,
sm_action_id int(19) NOT NULL,
PRIMARY KEY ( id ),
UNIQUE KEY uc_SMActionRuleRecord ( sm_rule_id , sm_action_id ),
KEY sm_action_id ( sm_action_id ),
CONSTRAINT sm_actions_rules_ibfk_1 FOREIGN KEY ( sm_rule_id ) REFERENCES sm_rules ( id ),
CONSTRAINT sm_actions_rules_ibfk_2 FOREIGN KEY ( sm_action_id ) REFERENCES sm_actions ( id )
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE sm_memory (
id int(19) NOT NULL AUTO_INCREMENT,
session_id varchar(255) NOT NULL,
state_machine_id int(19) DEFAULT NULL,
sm_variable_name varchar(255) NOT NULL,
sm_variable_value tinyint(1) DEFAULT NULL,
sm_last_modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
short_string_value varchar(255) DEFAULT NULL,
long_string_value text,
PRIMARY KEY ( id ),
UNIQUE KEY idx_sm_memory_session_id_sm_variable_name ( session_id , sm_variable_name ),
KEY index_sm_memory_matching ( session_id , state_machine_id , sm_variable_name , sm_variable_value ) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE sm_variables (
id int(19) NOT NULL AUTO_INCREMENT,
state_machine_id int(19) NOT NULL,
sm_variable_name varchar(255) NOT NULL,
PRIMARY KEY ( id ),
UNIQUE KEY uc_SMVariableName ( state_machine_id , sm_variable_name ),
CONSTRAINT sm_variables_ibfk_1 FOREIGN KEY ( state_machine_id ) REFERENCES state_machines ( id )
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE sm_conditions (
id int(19) NOT NULL AUTO_INCREMENT,
sm_rule_id int(19) NOT NULL,
sm_variable_id int(19) NOT NULL,
sm_variable_value tinyint(1) NOT NULL,
PRIMARY KEY ( id ),
UNIQUE KEY uc_SMConditionName ( sm_rule_id , sm_variable_id ),
KEY index_sm_conditions_matching ( sm_variable_id , sm_variable_value ) USING BTREE,
CONSTRAINT sm_conditions_ibfk_1 FOREIGN KEY ( sm_rule_id ) REFERENCES sm_rules ( id ),
CONSTRAINT sm_conditions_ibfk_2 FOREIGN KEY ( sm_variable_id ) REFERENCES sm_variables ( id )
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
DROP TABLE IF EXISTS filtered_relations;
CREATE TABLE filtered_relations (
subject VARCHAR NOT NULL,
predicate VARCHAR NOT NULL,
object VARCHAR NOT NULL,
keyword INT,
link VARCHAR
);
|
--Adjustment Amount is excluded for calculating Purchase Value
CREATE Procedure spr_Itemwise_purchase (@FromDate datetime, @ToDate Datetime)
as
select BillDetail.Product_Code ,
"Item Name" = Items.ProductName ,
"Purchase Value" = sum(BillDetail.amount + BillDetail.TaxAmount),
"Total Qty" = sum (Quantity)
From BillAbstract, BillDetail, Items
Where Items.Product_Code = BillDetail.Product_Code
AND BillDetail.BillId = BillAbstract.BillId
AND Billabstract.BillDate between @FromDate and @ToDate
AND (BillAbstract.Status & 128) = 0
Group by BillDetail.Product_Code, Items.ProductName
|
/****** Object: StoredProcedure [dbo].[prc_CWI_GetInvoicePO] Script Date: 3/15/2014 9:07:00 PM ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[prc_CWI_GetInvoicePO]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[prc_CWI_GetInvoicePO]
GO
/****** Object: StoredProcedure [dbo].[prc_CWI_GetInvoicePO] Script Date: 3/15/2014 9:07:00 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[prc_CWI_GetInvoicePO]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
/*******************************************************************
* PROCEDURE: prc_CWI_GetInvoicePO
* Purpose : This PROC would be called TO get PO details for job
* Invoked from : ManageInvoice.aspx
* CREATED: MohanKumar Sundaram 03/15/2014
* MODIFICATION HISTORY
* DATE AUTHOR DESCRIPTION
**********************************************************************
Execution example :
**********************************************************************
exec prc_CWI_GetInvoicePO
@JobId = 6
**********************************************************************/
CREATE PROC [dbo].[prc_CWI_GetInvoicePO]
@JobId bigint
AS
select
J.PONumber,
J.InvoiceId,
J.JobStatusLookupId,
ISNULL(CDI.IsConsolidated,0) IsConsolidated,
CDI.InvoiceTypeLookupId
from CWI_Job J
LEFT OUTER JOIN vw_CWI_ClientDivisionInvoice CDI
ON j.DivisionId = CDI.ClientDivId
WHERE
J.Id = @JobId'
END
GO
|
insert into shelfie(
name,price,img
)values(
$1,$2,$3
);
select * from shelfie; |
CREATE OR ALTER VIEW S_ACCOUNT_RECEIPTS(
ACCOUNT_ID,
SUM_RECEIPT)
AS
SELECT ACCOUNT_ID, SUM(SUM_RECEIPT)
FROM RECEIPTS
GROUP BY ACCOUNT_ID
;
|
CREATE TABLE pageviews (
`time` datetime,
`sid` uint64,
`request_id` uint64,
`url` string,
`user_agent` string,
`referrer` string,
`product_id` uint64,
`time_on_page` double,
`screen_width` uint64,
`screen_height` uint64,
`is_logged_in` bool,
PRIMARY KEY (time, sid, request_id),
) WITH
write_consistency_level = "RELAXED";
|
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(64) NOT NULL,
email VARCHAR (64) not null UNIQUE,
pass VARCHAR(265) not null
);
CREATE TABLE notes (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(64),
content VARCHAR(2048),
id_user INTEGER not null,
FOREIGN KEY (id_user) REFERENCES users(id)
);
insert into users (name, email, pass) values('Franco', 'franconecat@gmail.com', '123');
insert into notes (name, content, id_user) values('one', 'content', (select id from users where email like 'franconecat@gmail.com'));
|
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-06',14065457,'www.bing.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-06',19831166,'www.ebay.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-06',104346720,'www.facebook.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-06',21536612,'mail.live.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-06',13246531,'www.wikipedia.org')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-27',23154653,'www.ebay.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-06',11492756,'au.yahoo.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-06',26165099,'www.google.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-13',68487810,'www.youtube.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-27',16550230,'www.wikipedia.org')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-06',21734381,'ninemsn.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-20',24344783,'mail.live.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-20',22598506,'www.ebay.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-27',24272437,'mail.live.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-27',16041776,'www.bing.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-20',24241574,'ninemsn.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-20',118984483,'www.facebook.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-27',24521168,'ninemsn.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-27',123831275,'www.facebook.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-20',16595739,'www.bing.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-13',118506019,'www.facebook.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-20',170020924,'www.google.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-27',69327140,'www.youtube.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-13',24772355,'mail.live.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-13',24555033,'ninemsn.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-20',28996455,'www.google.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-13',16618315,'www.bing.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-27',171842376,'www.google.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-06',59811438,'www.youtube.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-13',13316233,'www.netbank.commbank.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-20',13072234,'www.netbank.commbank.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-13',22785028,'www.ebay.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-20',16519992,'www.wikipedia.org')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-27',14369775,'www.bom.gov.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-27',29422150,'www.google.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-20',69064107,'www.youtube.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-06',151749278,'www.google.com.au')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-13',16015926,'www.wikipedia.org')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-13',29203671,'www.google.com')
INSERT INTO VISIT(WEEK_FROM,VISITS,URL) VALUES('2016-02-13',172220397,'www.google.com.au')
|
DROP TABLE IF EXISTS course;
CREATE TABLE course (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(250) NOT NULL,
description VARCHAR(250) NOT NULL
);
INSERT INTO course (name, description) VALUES ('Java', 'Ejemplo básico con spring boot'); |
CREATE TABLE tilbakekreving (
id BIGINT PRIMARY KEY,
fk_vedtak_id BIGINT REFERENCES vedtak (id),
valg VARCHAR NOT NULL,
varsel TEXT,
begrunnelse TEXT NOT NULL,
tilbakekrevingsbehandling_id TEXT,
opprettet_av VARCHAR DEFAULT 'VL'::CHARACTER VARYING NOT NULL,
opprettet_tid TIMESTAMP DEFAULT LOCALTIMESTAMP NOT NULL,
endret_av VARCHAR,
endret_tid TIMESTAMP(3),
versjon BIGINT DEFAULT 0
);
CREATE SEQUENCE tilbakekreving_seq INCREMENT BY 50 START WITH 1000000 NO CYCLE;
CREATE INDEX ON tilbakekreving (fk_vedtak_id); |
/*
SQLyog Enterprise - MySQL GUI v7.15
MySQL - 5.6.23 : Database - mywebbudget
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!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' */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`mywebbudget` /*!40100 DEFAULT CHARACTER SET utf8 */;
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'secretpassword';
GRANT ALL ON mywebbudget.* to 'admin'@'localhost';
FLUSH PRIVILEGES;
USE `mywebbudget`;
/*Table structure for table `account` */
DROP TABLE IF EXISTS `account`;
CREATE TABLE `account` (
`account_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL,
`money` decimal(15,2) NOT NULL,
`user` int(11) unsigned NOT NULL,
PRIMARY KEY (`account_id`),
KEY `FK_account_user_user_id` (`user`),
CONSTRAINT `FK_account_user_user_id` FOREIGN KEY (`user`) REFERENCES `user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;
/*Table structure for table `category` */
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`category_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL,
`user` int(11) unsigned NOT NULL,
PRIMARY KEY (`category_id`),
KEY `FK_category_user_user_id` (`user`),
CONSTRAINT `FK_category_user_user_id` FOREIGN KEY (`user`) REFERENCES `user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;
/*Table structure for table `transaction` */
DROP TABLE IF EXISTS `transaction`;
CREATE TABLE `transaction` (
`transaction_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`amount` decimal(15,2) NOT NULL,
`date` date NOT NULL,
`account` int(11) unsigned NOT NULL,
`category` int(11) unsigned NOT NULL,
`comment` varchar(100) DEFAULT NULL,
PRIMARY KEY (`transaction_id`),
KEY `FK_transaction_account_account_id` (`account`),
KEY `FK_transaction_category_category_id` (`category`),
CONSTRAINT `FK_transaction_account_account_id` FOREIGN KEY (`account`) REFERENCES `account` (`account_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_transaction_category_category_id` FOREIGN KEY (`category`) REFERENCES `category` (`category_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;
/*Table structure for table `user` */
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`user_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`login` varchar(15) NOT NULL,
`password` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
/*
Name: Top 10 of countries most listings viewed
Data source: 4
Created By: Admin
Last Update At: 2017-01-06T15:50:22.674442+00:00
*/
select Country,Views, SUBSTRING(STRING((Views / Total)*100),1,6) as Percentage
from (
select '1' as col, Country,Views,sum(Views) OVER (order by col) as Total from (
SELECT countryname AS Country,
sum(Views) AS Views,
FROM
(SELECT COUNTRIES1.countryname AS countryname,
count(*) AS Views
FROM
(SELECT post_prop20 AS Listing,
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_page_event = "0" /*Page View Calls*/
AND DATE(date_time) >= DATE('{{startdate}}')
AND DATE(date_time) <= DATE('{{enddate}}')
AND post_prop19 = 'listing') c
JOIN
(SELECT upper(country) AS country,
id
FROM [djomniture:devspark.MG_Listing_Address] )AS MG_LA ON c.Listing = MG_LA.id
JOIN
(SELECT upper(cou) AS countryname
FROM [djomniture:devspark.country]) AS COUNTRIES1 ON (COUNTRIES1.countryname = MG_LA.country)
GROUP BY countryname),
(SELECT COUNTRIES2.countryname AS countryname,
count(*) AS Views
FROM
(SELECT post_prop20 AS Listing,
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_page_event = "0" /*Page View Calls*/
AND DATE(date_time) >= DATE('{{startdate}}')
AND DATE(date_time) <= DATE('{{enddate}}')
AND post_prop19 = 'listing') c
JOIN
(SELECT upper(country) AS country,
id
FROM [djomniture:devspark.MG_Listing_Address] )AS MG_LA ON c.Listing = MG_LA.id
JOIN
(SELECT upper(codigodos)AS codigodos,
upper(cou) AS countryname
FROM[djomniture:devspark.country]) AS COUNTRIES2 ON (MG_LA.country=COUNTRIES2.codigodos)
GROUP BY countryname) ,
(SELECT COUNTRIES3.countryname AS countryname,
count(*) AS Views
FROM
(SELECT post_prop20 AS Listing,
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_page_event = "0" /*Page View Calls*/
AND DATE(date_time) >= DATE('{{startdate}}')
AND DATE(date_time) <= DATE('{{enddate}}')
AND post_prop19 = 'listing') c
JOIN
(SELECT upper(country) AS country,
id
FROM [djomniture:devspark.MG_Listing_Address] )AS MG_LA ON c.Listing = MG_LA.id
JOIN
(SELECT upper(codigotres) AS codigotres,
upper(cou) AS countryname
FROM[djomniture:devspark.country]) AS COUNTRIES3 ON (MG_LA.country=COUNTRIES3.codigotres)
GROUP BY countryname)
GROUP BY Country
) order by Views desc
)
limit 10
|
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (1, 'SEO', 'Seoul Dynasty', 'PAC', 4, 0);
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (2, 'NYE', 'New York Excelsior', 'ATL', 4, 0);
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (3, 'LDN', 'London Spitfire', 'ATL', 4, 0);
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (4, 'VAL', 'Los Angeles Valiant', 'PAC', 2, 2);
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (5, 'GLA', 'Los Angeles Gladiators', 'PAC', 2, 2);
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (6, 'HOU', 'Houston Outlaws', 'ATL', 2, 2);
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (7, 'PHI', 'Philadelphia Fusion', 'ATL', 2, 2);
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (8, 'BOS', 'Boston Uprising', 'ATL', 1, 3);
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (9, 'SFS', 'San Francisco Shock', 'PAC', 2, 2);
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (10, 'DAL', 'Dallas Fuel', 'PAC', 0, 4);
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (11, 'FLA', 'Florida Mayhem', 'ATL', 1, 3);
INSERT INTO owl.owl_score (team_id, name_abbr, team_name, region, win, lose)
VALUES (12, 'SHD', 'Shanghai Dragons', 'PAC', 0, 4);
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (1, 'SEO', 'PAC', 'Seoul Dynasty', '/pic/team/SEO.svg', '#AA8A00', '#000000');
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (2, 'NYE', 'ATL', 'New York Excelsior', '/pic/team/NYE.svg', '#0F57EA', '#171C38');
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (3, 'LDN', 'ATL', 'London Spitfire', '/pic/team/LDN.svg', '#59CBE8', '#FF8200');
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (4, 'VAL', 'PAC', 'Los Angeles Valiant', '/pic/team/VAL.svg', '#000000', '#4A7729');
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (5, 'GLA', 'PAC', 'Los Angeles Gladiators', '/pic/team/GLA.svg', '#000000', '#3C1053');
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (6, 'HOU', 'ATL', 'Houston Outlaws', '/pic/team/HOU.svg', '#000000', '#97D700');
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (7, 'PHI', 'ATL', 'Philadelphia Fusion', '/pic/team/PHI.svg', '#000000', '#FF9E1B');
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (8, 'BOS', 'ATL', 'Boston Uprising', '/pic/team/BOS.svg', '#EFDF00', '#174B97');
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (9, 'SFS', 'PAC', 'San Francisco Shock', '/pic/team/SFS.svg', '#75787B', '#FC4C02');
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (10, 'DAL', 'PAC', 'Dallas Fuel', '/pic/team/DAL.svg', '#0072CE', '#032340');
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (11, 'FLA', 'ATL', 'Florida Mayhem', '/pic/team/FLA.svg', '#AF272F', '#FEDB00');
INSERT INTO owl.team_info (team_id, name_abbr, region, team_name, image, accent_color, primary_color)
VALUES (12, 'SHD', 'PAC', 'Shanghai Dragons', '/pic/team/SHD.svg', '#000000', '#D22630'); |
DROP TABLE AP_OFICII CASCADE CONSTRAINTS;
DROP TABLE AP_ANGAJATI CASCADE CONSTRAINTS;
DROP TABLE AP_COMPANII CASCADE CONSTRAINTS;
DROP TABLE AP_PRODUSE CASCADE CONSTRAINTS;
DROP TABLE AP_TRANZACTII CASCADE CONSTRAINTS;
DROP SEQUENCE PRODUS_SEQ;
CREATE TABLE AP_OFICII(cod_oficiu VARCHAR2(2) PRIMARY KEY,
localitatea VARCHAR2(15),
regiunea VARCHAR2(6),
cod_manager VARCHAR2(3));
CREATE TABLE AP_ANGAJATI (cod_angajat VARCHAR(2) PRIMARY KEY, nume VARCHAR2(15),
prenume VARCHAR2(15),
varsta NUMBER,
functia VARCHAR2(20),
cod_oficiu VARCHAR2(2),
CONSTRAINT fk_cod_of FOREIGN KEY(cod_oficiu) REFERENCES AP_OFICII(cod_oficiu),data_angajarii date, suma_planificata NUMBER(8,2));
CREATE TABLE AP_COMPANII(cod_companie VARCHAR2(2) PRIMARY KEY,
compania VARCHAR2(15),
reprezentant_companie VARCHAR2(3),
datoria NUMBER(*,2),
CONSTRAINT fk_rep FOREIGN KEY(reprezentant_companie) REFERENCES AP_ANGAJATI(cod_angajat));
CREATE TABLE AP_PRODUSE(cod_produs NUMBER PRIMARY KEY,
descriere VARCHAR2(40),
pret NUMBER(8,2),
exista VARCHAR2(1) CONSTRAINT ck_ex CHECK(exista='Y' OR exista='N'));
CREATE TABLE AP_TRANZACTII(data_comenzii DATE,
cod_client VARCHAR(2),
cod_vanzator VARCHAR2(3),
cod_produs NUMBER,
cantiatea NUMBER,
CONSTRAINT fk_cod_client FOREIGN KEY(cod_client) REFERENCES AP_COMPANII(cod_companie),
CONSTRAINT fk_cod_vanzator FOREIGN KEY(cod_vanzator) REFERENCES AP_ANGAJATI(cod_angajat),
CONSTRAINT fk_cod_produs FOREIGN KEY(cod_produs) REFERENCES AP_PRODUSE(cod_produs));
ALTER TABLE AP_OFICII
Add CONSTRAINT fk_cod_manager FOREIGN KEY (cod_manager) REFERENCES AP_ANGAJATI(cod_angajat);
CREATE SEQUENCE produs_seq
START WITH 1
INCREMENT BY 1
MAXVALUE 1000;
|
CREATE TABLE machine_info_db.t_machine_info (
Findex int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
Ftype varchar(64) NOT NULL DEFAULT '' COMMENT '机器角色',
Fserver_host varchar(32) NOT NULL DEFAULT '' COMMENT '服务器IP',
Fserver_port int(11) NOT NULL DEFAULT '0' COMMENT '服务器Port',
Fstate varchar(16) NOT NULL DEFAULT '' COMMENT '机器状态:online|非online',
Fcreate_time datetime NOT NULL DEFAULT '1970-01-01 00:00:00' COMMENT '创建时间',
Fmodify_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (Findex),
UNIQUE KEY Fserver_host_port (Fserver_host,Fserver_port),
KEY idx_Ftype (Ftype),
KEY idx_Fmodify_time (Fmodify_time)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='DBA CMDB信息表|arthurhuang|2018-12-01';
|
/* Table : LIEN_PARENTE
*/
CREATE TABLE lien_parente(
lie_id SERIAL,
lie_libelle varchar(50),
CONSTRAINT pk_lien_parente PRIMARY KEY (lie_id)
);
/* Table : TYPE_CONTACT
*/
CREATE TABLE type_contact(
typ_id SERIAL,
typ_libelle varchar(50),
CONSTRAINT pk_type_contact PRIMARY KEY (typ_id)
);
/* Table : CEINTURE
*/
CREATE TABLE ceinture(
cei_id SERIAL,
cei_libelle varchar(50) NOT NULL,
cei_age_mini int,
CONSTRAINT pk_ceinture PRIMARY KEY (cei_id)
);
/* Table : COURS
*/
CREATE TABLE cours(
cou_id SERIAL,
cou_libelle varchar(50) NOT NULL,
cou_age int,
CONSTRAINT pk_cours PRIMARY KEY (cou_id)
);
/* Table : SAISON
*/
CREATE TABLE saison(
sai_id SERIAL,
sai_debut int NOT NULL,
sai_fin int NOT NULL,
CONSTRAINT pk_saison PRIMARY KEY (sai_id)
);
/* Table : POSITION
*/
CREATE TABLE position(
pos_id SERIAL,
pos_libelle varchar(30) NOT NULL,
CONSTRAINT pk_position PRIMARY KEY (pos_id)
);
/* Table : FAMILLE
*/
CREATE TABLE famille(
fam_id SERIAL,
fam_libelle varchar(50) NOT NULL,
CONSTRAINT pk_famille PRIMARY KEY (fam_id),
CONSTRAINT c_fam_libelle_unique UNIQUE(fam_libelle)
);
/* Table : ADHERENT
* Dépend de : FAMILLE
* POSITION
*/
CREATE TABLE adherent(
adh_id SERIAL,
adh_nom varchar(25),
adh_prenom varchar(25),
adh_genre char(1),
adh_date_naissance date,
adh_adresse_postale varchar(60),
adh_adresse_complement varchar(60),
adh_code_postal varchar(10),
adh_ville varchar(40),
adh_certificat_medical boolean,
adh_licence boolean,
adh_licence_numero varchar(25),
adh_famille int,
adh_position int,
CONSTRAINT pk_adherent PRIMARY KEY (adh_id),
CONSTRAINT fk_adh_famille FOREIGN KEY (adh_famille) REFERENCES famille(fam_id),
CONSTRAINT fk_adh_position FOREIGN KEY (adh_position) REFERENCES position(pos_id)
);
/* Table : Inscrire
* Dépend de : SAISON
* ADHERENT
*/
CREATE TABLE inscrire(
ins_saison int,
ins_adherent int,
CONSTRAINT pk_inscrire PRIMARY KEY (ins_saison, ins_adherent),
CONSTRAINT fk_ins_saison FOREIGN KEY (ins_saison) REFERENCES saison(sai_id),
CONSTRAINT fk_ins_adherent FOREIGN KEY (ins_adherent) REFERENCES adherent(adh_id),
CONSTRAINT c_ins_saison_adherent_unique UNIQUE(ins_saison, ins_adherent)
);
/* Table : Suivre
* Dépend de : SAISON
* ADHERENT
* COURS
*/
CREATE TABLE suivre(
sui_saison int,
sui_adherent int,
sui_cours int,
CONSTRAINT pk_suivre PRIMARY KEY (sui_saison, sui_adherent, sui_cours),
CONSTRAINT fk_sui_saison_adherent FOREIGN KEY (sui_saison, sui_adherent) REFERENCES inscrire(ins_saison, ins_adherent),
CONSTRAINT fk_sui_cours FOREIGN KEY (sui_cours) REFERENCES cours(cou_id)
);
/* Table : Passer
* Dépend de : SAISON
* ADHERENT
* CEINTURE
*/
CREATE TABLE passer(
pas_saison int,
pas_adherent int,
pas_ceinture int,
pas_date date,
CONSTRAINT pk_passer PRIMARY KEY (pas_saison, pas_adherent, pas_ceinture),
CONSTRAINT fk_pas_saison_adherent FOREIGN KEY (pas_saison, pas_adherent) REFERENCES inscrire(ins_saison, ins_adherent),
CONSTRAINT fk_pas_ceinture FOREIGN KEY (pas_ceinture) REFERENCES ceinture(cei_id)
);
/* Table : CONTACT
* Dépend de : TYPE_CONTACT
* LIEN_PARENTE
* ADHERENT
*/
CREATE TABLE contact(
con_id SERIAL,
con_contact varchar(100) NOT NULL,
con_type int NOT NULL,
con_lien_parente int,
con_adherent int,
CONSTRAINT pk_contact PRIMARY KEY (con_id),
CONSTRAINT fk_con_type FOREIGN KEY (con_type) REFERENCES type_contact(typ_id),
CONSTRAINT fk_con_lien_parente FOREIGN KEY (con_lien_parente) REFERENCES lien_parente(lie_id),
CONSTRAINT fk_con_adherent FOREIGN KEY (con_adherent) REFERENCES adherent(adh_id)
);
/* LIEN_PARENTE
* Entrées : 18
*/
insert into lien_parente (lie_libelle) values ('père');
insert into lien_parente (lie_libelle) values ('mère');
insert into lien_parente (lie_libelle) values ('grand-père paternel');
insert into lien_parente (lie_libelle) values ('grand-mère paternelle');
insert into lien_parente (lie_libelle) values ('grand-père maternel');
insert into lien_parente (lie_libelle) values ('grand-mère maternelle');
insert into lien_parente (lie_libelle) values ('grand frère');
insert into lien_parente (lie_libelle) values ('grande soeur');
insert into lien_parente (lie_libelle) values ('petit frère');
insert into lien_parente (lie_libelle) values ('petite soeur');
insert into lien_parente (lie_libelle) values ('jumeau');
insert into lien_parente (lie_libelle) values ('jumelle');
insert into lien_parente (lie_libelle) values ('oncle');
insert into lien_parente (lie_libelle) values ('tante');
insert into lien_parente (lie_libelle) values ('cousin');
insert into lien_parente (lie_libelle) values ('cousine');
insert into lien_parente (lie_libelle) values ('conjoint');
insert into lien_parente (lie_libelle) values ('conjointe');
/* TYPE_CONTACT
* Entrées : 4
*/
insert into type_contact (typ_libelle) values ('fixe');
insert into type_contact (typ_libelle) values ('mobile');
insert into type_contact (typ_libelle) values ('fax');
insert into type_contact (typ_libelle) values ('mail');
/* POSITION
* Entrées : 3
*/
insert into position (pos_libelle) values ('nouveau');
insert into position (pos_libelle) values ('renouvellement');
insert into position (pos_libelle) values ('essai');
/* CEINTURE
* Entrées : 22
*/
insert into ceinture (cei_libelle) values ('blanche');
insert into ceinture (cei_libelle, cei_age_mini) values ('blanche 1 liseré jaune', 5);
insert into ceinture (cei_libelle, cei_age_mini) values ('blanche 2 liserés jaunes', 6);
insert into ceinture (cei_libelle, cei_age_mini) values ('blanche-jaune', 7);
insert into ceinture (cei_libelle, cei_age_mini) values ('jaune', 8);
insert into ceinture (cei_libelle, cei_age_mini) values ('jaune-orange', 9);
insert into ceinture (cei_libelle, cei_age_mini) values ('orange', 10);
insert into ceinture (cei_libelle, cei_age_mini) values ('orange-verte', 11);
insert into ceinture (cei_libelle, cei_age_mini) values ('verte', 12);
insert into ceinture (cei_libelle, cei_age_mini) values ('bleue', 13);
insert into ceinture (cei_libelle, cei_age_mini) values ('violette', 13);
insert into ceinture (cei_libelle, cei_age_mini) values ('marron', 14);
insert into ceinture (cei_libelle, cei_age_mini) values ('noire 1e dan', 15);
insert into ceinture (cei_libelle, cei_age_mini) values ('noire 2e dan', 17);
insert into ceinture (cei_libelle, cei_age_mini) values ('noire 3e dan', 20);
insert into ceinture (cei_libelle, cei_age_mini) values ('noire 4e dan', 24);
insert into ceinture (cei_libelle, cei_age_mini) values ('noire 5e dan', 29);
insert into ceinture (cei_libelle, cei_age_mini) values ('rouge-blanche 6e dan', 35);
insert into ceinture (cei_libelle, cei_age_mini) values ('rouge-blanche 7e dan', 42);
insert into ceinture (cei_libelle, cei_age_mini) values ('rouge-blanche 8e dan', 50);
insert into ceinture (cei_libelle, cei_age_mini) values ('rouge 9e dan', 60);
insert into ceinture (cei_libelle, cei_age_mini) values ('rouge 10e dan', 93);
/* SAISON
* Entrées : 6
*/
insert into saison (sai_debut, sai_fin) values (2015, 2016);
insert into saison (sai_debut, sai_fin) values (2016, 2017);
insert into saison (sai_debut, sai_fin) values (2017, 2018);
insert into saison (sai_debut, sai_fin) values (2018, 2019);
insert into saison (sai_debut, sai_fin) values (2019, 2020);
insert into saison (sai_debut, sai_fin) values (2020, 2021);
/* COURS
* Entrées : 13
*/
insert into cours (cou_libelle, cou_age) values ('Oregano', 5);
insert into cours (cou_libelle, cou_age) values ('Gentamicin Sulfate', 6);
insert into cours (cou_libelle, cou_age) values ('Instant Hand Sanitizer', 7);
insert into cours (cou_libelle, cou_age) values ('Kinesys', 8);
insert into cours (cou_libelle, cou_age) values ('Benztropine mesylate', 9);
insert into cours (cou_libelle, cou_age) values ('Neomycin', 10);
insert into cours (cou_libelle, cou_age) values ('Ciprofloxacin', 11);
insert into cours (cou_libelle, cou_age) values ('Geodon', 12);
insert into cours (cou_libelle, cou_age) values ('Mesylate', 13);
insert into cours (cou_libelle, cou_age) values ('Family Dollar', 14);
insert into cours (cou_libelle, cou_age) values ('Captopril', 15);
insert into cours (cou_libelle) values ('Bodycology');
insert into cours (cou_libelle) values ('Safeway'); |
DROP DATABASE shaks;
CREATE DATABASE shaks;
USE shaks;
CREATE TABLE docs_global (
doc_id int(11) NOT NULL AUTO_INCREMENT,
document varchar(50) NOT NULL,
PRIMARY KEY (doc_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE path_global (
doc_id int(11) NOT NULL,
path_id int(11) NOT NULL,
path varchar(100) NOT NULL,
PRIMARY KEY (doc_id, path_id),
FOREIGN KEY (doc_id) REFERENCES docs_global (doc_id) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE edge_global (
doc_id int(11) NOT NULL,
id int(11) NOT NULL,
parent_id int(11) NOT NULL,
end_desc_id int(11) NOT NULL,
path_id int(11) NOT NULL,
value text,
PRIMARY KEY (doc_id, id),
KEY path_id (path_id),
KEY parent_id (parent_id),
KEY id (id),
FOREIGN KEY (doc_id, path_id) REFERENCES path_global (doc_id, path_id) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
SELECT Employees.FirstName,Employees.MiddleName,Employees.LastName,Employees.Salary
FROM Employees |
CREATE SCHEMA IF NOT EXISTS mylibrary DEFAULT CHARACTER SET utf8 ;
USE mylibrary ;
CREATE TABLE IF NOT EXISTS Book (
book_id BIGINT NOT NULL AUTO_INCREMENT,
book_name VARCHAR(45) NOT NULL,
author VARCHAR(45) NOT NULL,
publisher VARCHAR(50) NULL,
imprint_year INT NULL,
amount INT NOT NULL,
PRIMARY KEY (book_id)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARACTER SET = utf8;
CREATE TABLE IF NOT EXISTS city (
city_id BIGINT NOT NULL AUTO_INCREMENT,
city VARCHAR(25) NOT NULL,
PRIMARY KEY (city_id)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARACTER SET = utf8;
CREATE TABLE IF NOT EXISTS person (
person_id BIGINT NOT NULL AUTO_INCREMENT,
surname VARCHAR(25) NOT NULL,
name VARCHAR(25) NOT NULL,
email VARCHAR(45) NULL,
city_id BIGINT NULL,
street VARCHAR(30) NULL,
apartment VARCHAR(10) NULL,
PRIMARY KEY (person_id),
CONSTRAINT fk_person_city1
FOREIGN KEY (city_id)
REFERENCES mylibrary.city (city_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARACTER SET = utf8;
CREATE TABLE IF NOT EXISTS person_book (
person_id BIGINT NOT NULL,
book_id BIGINT NOT NULL,
PRIMARY KEY (person_id, book_id),
CONSTRAINT personbook_ibfk_1
FOREIGN KEY (person_id)
REFERENCES mylibrary.person (person_id),
CONSTRAINT personbook_ibfk_2
FOREIGN KEY (book_id)
REFERENCES mylibrary.book (book_id)
) ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
CREATE TABLE IF NOT EXISTS logger (
logger_id BIGINT NOT NULL AUTO_INCREMENT,
person VARCHAR(50) NOT NULL,
book VARCHAR(90) NOT NULL,
action VARCHAR(10) NOT NULL,
time_stamp DATETIME NOT NULL,
user VARCHAR(50) NULL,
PRIMARY KEY (logger_id)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARACTER SET = utf8;
|
show tables
select * from bryce_table
create table test_table as select a, b from bryce_table
select * from test_table
drop table test_table
show tables
|
-- DADOS USADOS NO AMBIENTE DE TESTES
INSERT INTO COMPANY (ID, NAME) VALUES
(1, 'Yo'),
(2, 'What');
INSERT INTO EMPLOYEE (ID, NAME, AGE, COMPANY) VALUES
(1, 'aaa', 40, 1),
(2, 'bbb', 50, 2),
(3, 'ccc', 30, 2),
(4, 'ddd', 20, 1); |
DROP TABLE IF EXISTS `brUsers`;
CREATE TABLE `brUsers` (
`userID` int(11) NOT NULL AUTO_INCREMENT,
`userName` varchar(128) NOT NULL,
`password` varchar(64) NOT NULL,
`email` varchar(128) DEFAULT '' NOT NULL,
`createdTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`deactivatedTime` timestamp NULL DEFAULT NULL,
`characterID` int(16) DEFAULT NULL,
`corporationID` int(16) DEFAULT NULL,
`allianceID` int(16) DEFAULT NULL,
`isAdmin` tinyint(1) DEFAULT 0 NOT NULL,
PRIMARY KEY (`userID`),
UNIQUE KEY `userName` (`userName`),
KEY `brUsers_IX_login` (`userName`, `deactivatedTime`, `userID`, `password`),
KEY `brUsers_IX_characterID` (`characterID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
CREATE DATABASE evaluaciones;
USE evaluaciones;
CREATE TABLE docentes(
cedula varchar(8) NOT NULL,
nombre VARCHAR(50) NOT NULL,
pass VARCHAR(50) NOT NULL,
id_grupo INT(2) NOT NULL,
id_materia INT(2) NOT NULL,
PRIMARY KEY(cedula)
) ENGINE=InnoDB ;
CREATE TABLE estudiantes(
codigo varchar(6) NOT NULL,
nombre varchar(39) NOT NULL,
id_grupo INT(2) NOT NULL,
id_materia INT(2) NOT NULL,
PRIMARY KEY(codigo)
) ENGINE=InnoDB ;
CREATE TABLE grupos(
id_grupo INT(2) NOT NULL auto_increment,
nombre_grupo VARCHAR(12) NOT NULL,
PRIMARY KEY(id_grupo)
) ENGINE=InnoDB ;
CREATE TABLE materias(
id_materia INT(2) NOT NULL auto_increment,
nombre_materia VARCHAR(20) NOT NULL,
PRIMARY KEY(id_materia)
) ENGINE=InnoDB ;
|
CREATE TABLE ComandanteLogs
(
Id NVARCHAR(8000),
TraceIdentifier NVARCHAR(8000),
LogLevel NVARCHAR(8000),
EventId NVARCHAR(8000),
LoggerName NVARCHAR(8000),
Details NVARCHAR(8000),
Exception NVARCHAR(8000),
Created DATE,
)
CREATE TABLE ComandanteRequests
(
TraceIdentifier NVARCHAR(8000),
Host NVARCHAR(8000),
Method NVARCHAR(8000),
Scheme NVARCHAR(8000),
Protocol NVARCHAR(8000),
Path NVARCHAR(8000),
PathBase NVARCHAR(8000),
Headers NVARCHAR(8000),
Cookies NVARCHAR(8000),
Form NVARCHAR(8000),
QueryString NVARCHAR(8000),
Body NVARCHAR(8000),
IdentityName NVARCHAR(8000),
MaxLogLevel NVARCHAR(8000),
ResponseStatusCode NVARCHAR(8000),
ResponseHeaders NVARCHAR(8000),
Created DATE,
Completed DATE
)
|
drop table if exists bitmp.tmamiya_order_defect_order_aggregate;
create table bitmp.tmamiya_order_defect_order_aggregate as(
/*select OrderNum,
count(*)
from
(*/
select
q1.customer_id,
customer_segment,
year(q1.order_date) as year,
CEIL(MONTH(q1.order_date)/3) as quarter,
q1.order_date,
OrderNum,
Parcel+WG as "Total_packages",
Parcel+WG-Cancelled_Packages as "Shipped_packages",
Cancelled_Packages,
Parcel,
WG,
Late,
Early,
Early_Defect,
On_time,
Defect_damage,
Defect_wrong_item,
Defect_transit,
/*why was cancellation ommitted in Total Defects?*/
Late+Defect_damage+Defect_wrong_item+Defect_transit+cancellation as Total_defects,
Cancellation,
CSA_issued_damage,
CSA_issued_shipping,
CSA_issued_other,
CSA_issued_damage+CSA_issued_shipping+CSA_issued_other as Total_CSA_Issued,
cast((mo.next_order_dt-mo.order_date) as varchar) as days_until_next_order,
window_grp
FROM
/*q*/
(
select
min(order_date) as order_date,
isnull(customer_segment,'White') as customer_segment,
customer_id,
OrderNum,
window_grp,
sum(DECODE(dlvmode, 'PARCEL' , packages, 0)) AS "Parcel" ,
sum(DECODE(dlvmode, 'WGHD' , packages, 0)) AS "WG",
sum(DECODE(on_time_defect, 'Late' , packages, 0)) AS "Late" ,
sum(DECODE(on_time_defect, 'Early' , packages, 0)) AS "Early" ,
sum(DECODE(on_time_defect, 'Early_Defect' , packages, 0)) AS "Early_Defect" ,
sum(DECODE(on_time_defect, 'On_time' , packages, 0)) AS "On_time" ,
sum(DECODE(on_time_defect, 'other' , packages, 0)) AS "Cancelled_Packages" ,
sum(DECODE(Damage_Defect, 'Y' , packages, 0)) AS "Defect_damage" ,
sum(DECODE(AssistlyWrongItem, 'Y' , packages, 0)) AS "Defect_wrong_item" ,
sum(DECODE(AssistlyTransit, 'Y' , packages, 0)) AS "Defect_transit" ,
sum(DECODE(Cancel, 'Y' , packages, 0)) AS "Cancellation" ,
sum(DECODE(CSADamaged, 'Y' , packages, 0)) AS "CSA_issued_damage" ,
sum(DECODE(CSAShipping, 'Y' , packages, 0)) AS "CSA_issued_shipping" ,
sum(DECODE(CSAOther, 'Y' , packages, 0)) AS "CSA_issued_other"
/*AssistlyDamaged,
,
AssistlyOther,
,
CSADamaged,
CSAOther,
,
CancelOther,
Damage_Defect,*/
from
(Select
order_date,
o.customer_id,
OrderNum,
dlvmode,
on_time_defect,
AssistlyWrongItem,
AssistlyDamaged,
AssistlyTransit,
AssistlyOther,
CSAShipping,
CSADamaged,
CSAOther,
Cancel,
CancelOther,
Damage_Defect,
customer_segment_complete as customer_segment,
window_grp,
count (PackageId) as packages
FROM
bitmp.tmamiya_order_defect o
/*ADDING CUSTOMER SEGMENTATION*/
left join(
select
customer_id,
full_dt,
customer_segment_complete
FROM
bitmp.tmamiya_order_defect_customer_segmentation) cs on order_date = full_dt and cs.customer_id = o.customer_id
/*WHERE
customer_id = '10000031'*/
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
)q
group by 2,3,4,5
)q1
left join (select order_id, customer_id, date_trunc('day',order_date) as order_date, next_order_id, date_trunc('day',next_order_dt) as next_order_dt from analytics.merch_order /* where order_date between '01-01-2014' and '01-04-2014'*/) mo on mo.customer_id = q1.customer_id and cast(mo.order_id as varchar) = cast(q1.OrderNum as varchar)
);
Select
analyze_statistics('bitmp.tmamiya_order_defect_order_aggregate');
/*where OrderNum = '4105472'*/
/*where OrderNum = '4786638'*/
/*
)duplicatecheck
group by 1
having count(*) > 1
*/
/*select
*
from
raw_sources.assistly_cases
where
custom_order_number like '%4105472%'*/
/*select
*
from
raw_sources.salesline sl
where
salesid = '4786638'
*/
|
create table "file"
(
id varchar(20) not null,
name varchar(100) not null,
path varchar(200) not null,
size number not null,
checksum varchar(200) not null,
primary key(id)
); |
# 홍당무 마켓
/*
필요한 필드들
물품: 제목, 가격, 물품설명, 물품사진, (판매자닉네임, 판매자 매너온도) -> 물품 정보가 아닌 판매자 정보는 키만 가져온다.
판매자 정보: 닉네임, 프로필이미지URL, 매너온도, (판매물품들) -> 상호참조 X (판매자 아이디로 물품리스트 조회 가능하므로)
물품과 판매자 정보가 연결은 pk 값으로 연결한다.
*/
# 물품 테이블 생성
create table used_goods(
`id` int not null auto_increment primary key,
`title` varchar(64) not null,
`price` int not null,
`description` text not null,
`picture` varchar(255), -- nullable
`sellerId` int not null
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
# 판매자 테이블 생성
create table seller(
`id` int not null auto_increment primary key,
`nickname` varchar(20) not null,
`profileImageUrl` varchar(255),
`temperature` decimal(3, 1) not null -- 36.5 ~ 99도 -> 온도가 떨어질수도 있음
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- dummy data 추가
# 판매자 테이블 생성 - 물품 테이블이 판매자 PK를 참조하므로 먼저 생성
insert into seller
(`nickname`, `profileImageUrl`, `temperature`)
values
('마로비', 'https://cdn.pixabay.com/photo/2015/04/23/21/59/tree-736877__340.jpg', 36.5),
('아메리카노', NULL, 48.2),
('최준', 'https://cdn.pixabay.com/photo/2014/11/29/19/33/bald-eagle-550804__340.jpg', 29.0),
('빠다', NULL, 36.5),
('하구루', 'https://cdn.pixabay.com/photo/2015/04/23/21/59/tree-736877__340.jpg', 36.5);
# 물품 테이블 생성
insert into used_goods
(`title`, `price`, `description`, `picture`, `sellerId`)
values
('플스4 팝니다', 100000, '쿨거래 하실분들 연락주세요.', 'https://cdn.pixabay.com/photo/2016/11/21/15/08/computer-1845880__340.jpg', 5),
('원피스 팝니다', 20000, '살이 빠져서 사이즈가 커져서 못입습니다.', 'https://cdn.pixabay.com/photo/2020/06/10/01/55/transboundary-5280644__340.jpg', 5),
('후라다 여성지갑 팝니다', 200000, '오늘 선물하려 했는데 헤어졌어요', NULL, 3),
('바퀴벌레좀 잡아주세요.', 5000, '제발 잡아주세요. 못들어가고 있어요..', NULL, 2);
-- 하구루의 판매 물품 리스트 가져오기
select * from `seller` where nickname = '하구루';
select * from `used_goods` where `sellerId` = 5;
-- 바퀴벌레를 잡아달라는 사람의 닉네임과 매너온도 확인하기
select * from `used_goods` where `title` like '바퀴벌레%';
select nickname, temperature from `seller` where id = 2; |
SELECT * FROM Timestamp_test_from; |
# patch_56_57_k.sql
#
# title: meta_species.system_name
#
# description:
# Change species.ensembl_latin_name to system_name
update meta set meta_key='species.system_name' where meta_key='species.ensembl_latin_name';
# patch identifier
INSERT INTO meta (species_id, meta_key, meta_value) VALUES (NULL, 'patch', 'patch_56_57_k.sql|meta_species.system_name');
|
# ************************************************************
# Sequel Pro SQL dump
# バージョン 4096
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# ホスト: 127.0.0.1 (MySQL 5.6.14)
# データベース: baseball
# 作成時刻: 2014-12-30 21:03:54 +0000
# ************************************************************
/*!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 */;
/*!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 */;
# テーブルのダンプ team_offences
# ------------------------------------------------------------
DROP TABLE IF EXISTS `team_offences`;
CREATE TABLE `team_offences` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`team_id` int(11) DEFAULT NULL,
`batting_average` float DEFAULT NULL COMMENT '打率',
`plate_appearances` int(11) DEFAULT NULL COMMENT '打席数',
`times_at_bat` int(11) DEFAULT NULL COMMENT '打数',
`score` int(11) DEFAULT NULL COMMENT '得点',
`hit` int(11) DEFAULT NULL COMMENT '安打',
`two_base_hit` int(11) DEFAULT NULL COMMENT '二塁打',
`three_base_hit` int(11) DEFAULT NULL COMMENT '三塁打',
`home_run` int(11) DEFAULT NULL COMMENT '本塁打',
`base_hit` int(11) DEFAULT NULL COMMENT '塁打',
`runs_batted_in` int(11) DEFAULT NULL COMMENT '打点',
`steal` int(11) DEFAULT NULL COMMENT '盗塁',
`interrupt_steal` int(11) DEFAULT NULL COMMENT '盗塁刺',
`sacrifice_bunts` int(11) DEFAULT NULL COMMENT '犠打',
`sacrifice_flies` int(11) DEFAULT NULL COMMENT '犠牲フライ',
`base_on_balls` int(11) DEFAULT NULL COMMENT '四球',
`intentional_walks` int(11) DEFAULT NULL COMMENT '敬遠四球',
`hit_by_pitch` int(11) DEFAULT NULL COMMENT '死球',
`strike_out` int(11) DEFAULT NULL COMMENT '三振',
`double_plays` int(11) DEFAULT NULL COMMENT '併殺打',
`slugging_percentage` float DEFAULT NULL COMMENT '長打率',
`on_base_percentage` float DEFAULT NULL COMMENT '出塁率',
PRIMARY KEY (`id`),
KEY `team_id` (`team_id`),
CONSTRAINT `team_offences_ibfk_1` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `team_offences` WRITE;
/*!40000 ALTER TABLE `team_offences` DISABLE KEYS */;
INSERT INTO `team_offences` (`id`, `team_id`, `batting_average`, `plate_appearances`, `times_at_bat`, `score`, `hit`, `two_base_hit`, `three_base_hit`, `home_run`, `base_hit`, `runs_batted_in`, `steal`, `interrupt_steal`, `sacrifice_bunts`, `sacrifice_flies`, `base_on_balls`, `intentional_walks`, `hit_by_pitch`, `strike_out`, `double_plays`, `slugging_percentage`, `on_base_percentage`)
VALUES
(1,6,0.279,5653,5023,667,1401,223,15,139,2071,647,62,22,118,34,443,12,35,877,112,0.412,0.339),
(2,5,0.272,5538,4878,649,1326,219,23,153,2050,612,96,54,120,40,450,20,50,1134,104,0.42,0.337),
(3,2,0.264,5507,4823,599,1274,226,15,94,1812,563,55,37,121,35,483,16,45,1009,124,0.376,0.335),
(4,3,0.258,5521,4854,570,1250,215,21,87,1768,537,75,27,126,40,467,12,34,926,109,0.364,0.325),
(5,1,0.257,5480,4862,596,1248,207,7,144,1901,570,102,30,117,28,419,11,54,923,124,0.391,0.321),
(6,4,0.253,5464,4833,568,1224,211,27,121,1852,540,76,24,149,21,400,23,61,1107,110,0.383,0.317),
(7,9,0.28,5631,4935,607,1383,227,30,95,1955,574,124,49,146,47,444,21,59,921,96,0.396,0.344),
(8,8,0.258,5469,4710,584,1215,211,22,110,1800,559,126,58,177,27,470,20,85,907,91,0.382,0.334),
(9,12,0.255,5455,4768,549,1214,215,18,78,1699,518,64,44,118,36,488,9,45,959,119,0.356,0.327),
(10,10,0.251,5428,4731,593,1188,188,29,119,1791,564,134,48,172,26,452,8,47,1092,72,0.379,0.321),
(11,11,0.251,5433,4836,556,1213,260,33,96,1827,519,64,35,109,31,404,7,53,862,79,0.378,0.314),
(12,7,0.248,5563,4782,574,1187,221,26,125,1835,549,74,39,155,36,545,8,45,1234,81,0.384,0.329);
/*!40000 ALTER TABLE `team_offences` ENABLE KEYS */;
UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_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 */;
|
drop TABLE if exists dim_base_kind cascade;
CREATE TABLE dim_base_kind (
base_type character varying(20),
base_kind character varying(20),
kind_code int
);
insert into dim_base_kind values('2', '1', 1);
insert into dim_base_kind values('2', '2', 2);
insert into dim_base_kind values('2', '3', 3);
insert into dim_base_kind values('2', '4', 4);
commit;
/*
----------------------
1 | 1
2 | 1,2
3 | 1,2,3
4 | 1,2,3,4
5 | 2
6 | 2,3
7 | 2,3,4
8 | 3
9 | 3,4
10 | 4
------------
*/
select connectby(parent_id, id, name using parameters separator=',',showlevel=true, showparentid=false, showid=true, showname=false, shownameroot=true) over () as (level, id, name_root, name_path)
from (
select t1.id, t1.parent_id, t1.name
from (SELECT base_kind as name, kind_code as id, lag(kind_code) over(order by kind_code) as parent_id
FROM DIM_BASE_KIND
WHERE BASE_TYPE = '2') t1
) t
;
/*
level | id | name_root | name_path
-------+----+-----------+-----------
2 | 1 | | ,,1
3 | 2 | | ,,1,2
4 | 3 | | ,,1,2,3
5 | 4 | | ,,1,2,3,4
----------------------------------
*/
select t1.id as t1_id, t1.parent_id as t1_parent_id, t2.id as t2_id, t2.parent_id as t2_parent_id,
nvl(t1.parent_id,0)*10000+ t2.id as id,
case when t1.parent_id=t2.parent_id then
null
else
nvl(t1.parent_id,0)*10000+ t2.parent_id
end as parent_id,
t2.name
from (SELECT base_kind as name, kind_code as id, lag(kind_code) over(order by kind_code) as parent_id
FROM DIM_BASE_KIND
WHERE BASE_TYPE = '2') t1,
(SELECT base_kind as name, kind_code as id, lag(kind_code) over(order by kind_code) as parent_id
FROM DIM_BASE_KIND
WHERE BASE_TYPE = '2') t2
where t1.id<=t2.id
order by 1,3
;
/*
t1_id | t1_parent_id | t2_id | t2_parent_id | id | parent_id | name
-------+--------------+-------+--------------+-------+-----------+------
1 | | 1 | | 1 | | 1
1 | | 2 | 1 | 2 | 1 | 2
1 | | 3 | 2 | 3 | 2 | 3
1 | | 4 | 3 | 4 | 3 | 4
2 | 1 | 2 | 1 | 10002 | | 2
2 | 1 | 3 | 2 | 10003 | 10002 | 3
2 | 1 | 4 | 3 | 10004 | 10003 | 4
3 | 2 | 3 | 2 | 20003 | | 3
3 | 2 | 4 | 3 | 20004 | 20003 | 4
4 | 3 | 4 | 3 | 30004 | | 4
(10 rows)
*/
select row_number() over (order by id) as id, substr(name, 3, length(name)) as name
from (select connectby(parent_id, id, name using parameters separator=',', showlevel=true, showparentid=false, showid=true, showname=false, shownameroot=true) over () as (level, id, name_root, name)
from (
select /* t1.id as t1_id, t1.parent_id as t1_parent_id, t2.id as t2_id, t2.parent_id as t2_parent_id, */
nvl(t1.parent_id,0)*10000+ t2.id as id,
case when t1.parent_id=t2.parent_id then
null
else
nvl(t1.parent_id,0)*10000+ t2.parent_id
end as parent_id,
t2.name
from (SELECT base_kind as name, kind_code as id, lag(kind_code) over(order by kind_code) as parent_id
FROM DIM_BASE_KIND
WHERE BASE_TYPE = '2') t1,
(SELECT base_kind as name, kind_code as id, lag(kind_code) over(order by kind_code) as parent_id
FROM DIM_BASE_KIND
WHERE BASE_TYPE = '2') t2
where t1.id<=t2.id
) t3
) t
;
/*
id | name
----+---------
1 | 1
2 | 1,2
3 | 1,2,3
4 | 1,2,3,4
5 | 2
6 | 2,3
7 | 2,3,4
8 | 3
9 | 3,4
10 | 4
-------------------------------
*/
drop TABLE if exists dim_base_kind cascade;
|
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(11) DEFAULT NULL,
`password` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `user` (`id`, `username`, `password`)
VALUES
(1,'admin','21232f297a57a5a743894a0e4a801fc3'); |
-- --------------------------------------------------------
-- 主机: 192.168.37.128
-- 服务器版本: 5.5.44-MariaDB - MariaDB Server
-- 服务器操作系统: Linux
-- HeidiSQL 版本: 9.3.0.4984
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!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' */;
-- 导出 wedding 的数据库结构
CREATE DATABASE IF NOT EXISTS `wedding` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `wedding`;
-- 导出 表 wedding.t_contract 结构
CREATE TABLE IF NOT EXISTS `t_contract` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`no` varchar(45) DEFAULT NULL,
`person` int(11) DEFAULT NULL,
`fee` decimal(10,2) DEFAULT NULL,
`service_times` int(11) DEFAULT NULL,
`checker` int(11) DEFAULT NULL,
`vat_no` varchar(45) DEFAULT NULL,
`start_date` varchar(20) DEFAULT NULL,
`end_date` varchar(20) DEFAULT NULL,
`alive_flag` varchar(2) DEFAULT NULL,
`create_by` int(11) DEFAULT NULL,
`creation_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
-- 导出 表 wedding.t_match 结构
CREATE TABLE IF NOT EXISTS `t_match` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`match_date` varchar(20) DEFAULT NULL COMMENT '配对日期',
`name` int(11) NOT NULL DEFAULT '0' COMMENT '配对人',
`name_contract` int(11) NOT NULL DEFAULT '0' COMMENT '配对人合同',
`service_employee` int(11) NOT NULL DEFAULT '0' COMMENT '服务老师',
`match_person` int(11) NOT NULL DEFAULT '0' COMMENT '配对对象',
`match_person_contract` int(11) NOT NULL DEFAULT '0' COMMENT '配对对象合同',
`visit_result` varchar(20) DEFAULT '0' COMMENT '回访结果',
`visit_remark` varchar(500) DEFAULT '0' COMMENT '回访情况说明',
`alive_flag` varchar(2) NOT NULL DEFAULT '0',
`create_by` int(11) NOT NULL DEFAULT '0',
`creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
-- 导出 表 wedding.t_person 结构
CREATE TABLE IF NOT EXISTS `t_person` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
`gender` varchar(45) DEFAULT NULL,
`birth_date` varchar(45) DEFAULT NULL,
`constellation` varchar(45) DEFAULT NULL,
`height` decimal(10,2) DEFAULT NULL,
`education` varchar(45) DEFAULT NULL,
`census` varchar(45) DEFAULT NULL,
`company` varchar(45) DEFAULT NULL,
`salary` decimal(10,2) DEFAULT NULL,
`family` varchar(45) DEFAULT NULL,
`house` varchar(45) DEFAULT NULL,
`married_his` varchar(45) DEFAULT NULL,
`phone` varchar(45) DEFAULT NULL,
`requirement` varchar(45) DEFAULT NULL,
`alive_flag` varchar(45) DEFAULT NULL,
`create_by` int(11) NOT NULL,
`creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
-- 导出 表 wedding.t_user 结构
CREATE TABLE IF NOT EXISTS `t_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(45) NOT NULL,
`password` varchar(200) NOT NULL,
`staff` varchar(45) NOT NULL,
`role` varchar(45) DEFAULT NULL,
`alive_flag` varchar(2) NOT NULL,
`creation_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 数据导出被取消选择。
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
--**************************************************************************************************
-- This script is intended to be run in the event of something going wrong during sample load of CE
-- address frame (a.k.a. sample "frame"). NOTE: this cannot be used again in future, after the CE
-- samples have been loaded, and we are running subsequent sample: that script would have to be
-- MUCH more complicated.
--
-- How to run: manually copy the SQL and run it with a user who has correct permissions to do so.
--**************************************************************************************************
begin transaction;
-- Cascade is present because of foreign key in case_to_process and fulfilment_to_process tables
truncate table actionv2.cases cascade;
-- If a uac_qid_link has a null case_id, then it was created as part of an unaddressed batch
delete from actionv2.uac_qid_link where case_id is not null;
commit transaction; |
ALTER TABLE WELCOME_TOUR ADD COLUMN CONFIG TEXT DEFAULT '{}';
comment on column WELCOME_TOUR.CONFIG is
'Shepherd config';
create sequence SEQ_WELCOME_TOUR_STEP
start with 1000 cache 20;
-- ============================================================
-- Table : WELCOME_TOUR_STEP
-- ============================================================
create table WELCOME_TOUR_STEP
(
WEL_STEP_ID NUMERIC not null,
INTERNAL_STEP_ID VARCHAR(100) not null,
TEXT TEXT not null,
TITLE VARCHAR(100) not null,
SEQUENCE NUMERIC not null,
ENABLED bool not null,
TOUR_ID NUMERIC ,
constraint PK_WELCOME_TOUR_STEP primary key (WEL_STEP_ID)
);
comment on column WELCOME_TOUR_STEP.WEL_STEP_ID is
'Welcome tour step id';
comment on column WELCOME_TOUR_STEP.INTERNAL_STEP_ID is
'Internal step id';
comment on column WELCOME_TOUR_STEP.TEXT is
'Text';
comment on column WELCOME_TOUR_STEP.TITLE is
'Title';
comment on column WELCOME_TOUR_STEP.SEQUENCE is
'Sequence';
comment on column WELCOME_TOUR_STEP.ENABLED is
'Enabled';
comment on column WELCOME_TOUR_STEP.TOUR_ID is
'Tour';
alter table WELCOME_TOUR_STEP
add constraint FK_A_WELCOME_TOUR_WELCOME_TOUR_STEPS_WELCOME_TOUR foreign key (TOUR_ID)
references WELCOME_TOUR (WEL_ID);
create index A_WELCOME_TOUR_WELCOME_TOUR_STEPS_WELCOME_TOUR_FK on WELCOME_TOUR_STEP (TOUR_ID asc);
|
-- 查询计算机成绩低于95的学生信息
SELECT * FROM student
WHERE id in
(SELECT stu_id FROM score WHERE grade<95
AND c_name="计算机"); |
INSERT INTO bpk_stock_card_his (movement_date, movement_type, item_id, stock_id, lot_number, lot_number_id, quantity, small_unit_id, unit_lot_cost, unit_avg_cost)
SELECT
update_date,
'RCVTRN'::VARCHAR(255) movement_type,
item_id,
stock_id,
lot_number,
lot_number_id,
SUM(CAST((CASE WHEN isnumeric(qty) THEN qty ELSE '0' END) AS FLOAT)) quantity,
small_unit_id,
CASE WHEN isnumeric(small_unit_price_cost) THEN CAST(small_unit_price_cost AS FLOAT) ELSE 0 END small_unit_price_cost,
CASE WHEN isnumeric(avg_unit_price_cost) THEN CAST(avg_unit_price_cost AS FLOAT) ELSE 0 END avg_unit_price_cost
FROM stock_card
WHERE update_date='$P{dBeginDate}'
AND fix_stock_method_id IN ('+7', '+1', '+8', '+10', '+19')
GROUP BY update_date, update_date_time, item_id, stock_id, lot_number, lot_number_id, small_unit_id, small_unit_price_cost, avg_unit_price_cost
ORDER BY update_date_time; |
create database Watch_it;
use Watch_it;
create table alogin(
LOGINID nvarchar(10),
PASSWORD nvarchar(10)
);
create table customers(
FirstName varchar(50),
LastName varchar(50),
UserName varchar(50),
Password varchar(50)
);
create table Products(
Product_id int primary key,
WatchName varchar(50),
Image image,
Price varchar(50)
);
create table sign_up(
[First Name] nvarchar(150),
[Last Name] nvarchar(150),
[Email Id] nvarchar(150),
Password nchar(150),
[Confirm Password] nchar(150)
);
Data Source=DESKTOP-POSD9BE\SQLEXPRESS;Initial Catalog=rahul;Integrated Security=True
Data Source=DESKTOP-I1442A8;Initial Catalog=rahul;Integrated Security=True
Data Source=DESKTOP-I1442A8;Initial Catalog=BUSTICKET;Integrated Security=True
.NET Framework Data Provider for SQL Server
Product_name
.NET Framework Data Provider for SQL Server |
-- INSERÇÃO DE DADOS NA TABELA tb_curso
INSERT INTO tb_curso (nome, sigla) values ('Engenharia da Computação', 'ENGCOMP');
INSERT INTO tb_curso (nome, sigla) values ('Nutrição', 'NUTRI');
INSERT INTO tb_curso (nome, sigla) values ('Direito', 'DIR');
-- RECUPERAR TODOS os registros da tabela tb_curso
SELECT * FROM tb_curso;
-- RECUPERAR apenas os nomes dos cursos
SELECT nome FROM tb_curso;
SELECT id,nome FROM tb_curso;
-- RECUPERAR os registros do cursos de maneira ORDENADA
SELECT * FROM tb_curso ORDER BY nome;
-- Default 'asc (crescente)'
SELECT * FROM tb_curso ORDER BY nome asc;
-- 'desc (decrescente)'
SELECT * FROM tb_curso ORDER BY nome desc;
-- ATUALIZAR os dados de um registro
UPDATE tb_curso SET nome='Farmácia', sigla='FARM' WHERE id=3;
SELECT * FROM tb_curso WHERE id=3;
UPDATE tb_curso SET nome='Engenharia Aeronáutica', sigla='ENGAERO' WHERE id=1;
SELECT * FROM tb_curso WHERE id=1;
-- DELETAR Um registro
DELETE FROM tb_curso WHERE id=2;
SELECT * FROM tb_curso WHERE id=2;
-- UPDATE SEM WHERE
UPDATE tb_curso SET nome='NA FACULDADE PODE (ENGCOMP)';
-- DELETAR tabela tb_curso
-- DROP TABLE tb_curso;
-- INSERÇÃO de um novo aluno
INSERT INTO tb_aluno (id_curso,nome) VALUES (1, 'João da Silva');
INSERT INTO tb_aluno (id_curso,nome) VALUES (2, 'José Antônio');
INSERT INTO tb_aluno (id_curso,nome) VALUES (3, 'Carlos Fernando');
INSERT INTO tb_aluno (id_curso,nome) VALUES (100, 'Ana Maria');
-- JUNÇÃO de dados de duas tabelas
SELECT a.nome, c.nome FROM tb_aluno as a INNER JOIN tb_curso as c ON (a.id_curso = c.id);
SELECT * FROM tb_aluno as a INNER JOIN tb_curso as c ON (a.id_curso = c.id);
SELECT * FROM tb_curso ORDER BY id;
SELECT * FROM tb_aluno ORDER BY id;
|
CREATE TABLE IF NOT EXISTS subscription_plans(
id BIGSERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description VARCHAR(255) NOT NULL,
price NUMERIC(19,4) NOT NULL,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX IF NOT EXISTS subscription_plans_id_index ON subscription_plans(id);
CREATE INDEX IF NOT EXISTS subscription_plans_name_index ON subscription_plans(name);
|
CREATE TABLE version (
version INTEGER
);
INSERT INTO version (version)
VALUES (0);
|
-- phpMyAdmin SQL Dump
-- version 4.4.15.9
-- https://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 08, 2020 at 04:08 AM
-- Server version: 5.6.37
-- PHP Version: 7.1.8
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: `school`
--
-- --------------------------------------------------------
--
-- Table structure for table `averageresults`
--
CREATE TABLE IF NOT EXISTS `averageresults` (
`id` int(11) NOT NULL,
`exam` varchar(20) NOT NULL,
`term` varchar(5) NOT NULL,
`Class` varchar(11) NOT NULL,
`Stream` varchar(10) NOT NULL,
`Year` varchar(4) NOT NULL,
`studentReg` varchar(7) NOT NULL,
`subject` varchar(100) NOT NULL,
`marks` int(11) NOT NULL,
`grade` varchar(3) DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `averagetotals`
--
CREATE TABLE IF NOT EXISTS `averagetotals` (
`id` int(11) NOT NULL,
`studentReg` varchar(6) NOT NULL,
`exam` varchar(20) NOT NULL,
`total` int(11) NOT NULL,
`points` int(2) NOT NULL DEFAULT '0',
`Grade` varchar(3) NOT NULL DEFAULT '--',
`MeanScore` int(11) NOT NULL,
`Class` int(11) NOT NULL,
`Stream` varchar(16) NOT NULL,
`term` varchar(4) NOT NULL,
`year` varchar(4) NOT NULL,
`position` int(11) NOT NULL DEFAULT '0',
`StreamPosition` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `catresults`
--
CREATE TABLE IF NOT EXISTS `catresults` (
`id` int(11) NOT NULL,
`exam` varchar(5) NOT NULL,
`term` varchar(4) NOT NULL,
`Class` varchar(10) NOT NULL,
`Stream` varchar(20) NOT NULL,
`Year` int(4) NOT NULL,
`studentReg` int(11) NOT NULL,
`subject` varchar(45) NOT NULL,
`marks` int(11) NOT NULL,
`grade` varchar(3) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `catresults`
--
INSERT INTO `catresults` (`id`, `exam`, `term`, `Class`, `Stream`, `Year`, `studentReg`, `subject`, `marks`, `grade`, `status`) VALUES
(2, 'CAT 1', 'I', '3', 'S', 2020, 4352, 'Computer', 89, 'A', 1),
(3, 'CAT 1', 'I', '3', 'J', 2020, 4276, 'Computer', 78, 'A-', 1),
(4, 'CAT 1', 'I', '3', 'M', 2020, 4325, 'Computer', 67, 'B', 1),
(5, 'CAT 1', 'I', '3', 'M', 2020, 4308, 'Computer', 76, 'A-', 1),
(6, 'CAT 1', 'I', '3', 'R', 2020, 4365, 'Computer', 78, 'A-', 1),
(7, 'CAT 1', 'I', '3', 'S', 2020, 4406, 'Computer', 56, 'C+', 1),
(8, 'CAT 1', 'I', '3', 'M', 2020, 4270, 'Computer', 45, 'C-', 1),
(9, 'CAT 1', 'I', '3', 'R', 2020, 4387, 'Computer', 45, 'C-', 1),
(10, 'CAT 1', 'I', '3', 'M', 2020, 4385, 'Computer', 67, 'B', 1),
(11, 'CAT 1', 'I', '3', 'R', 2020, 4438, 'Computer', 78, 'A-', 1),
(12, 'CAT 1', 'I', '3', 'S', 2020, 4324, 'Computer', 37, 'A', 1);
-- --------------------------------------------------------
--
-- Table structure for table `cats`
--
CREATE TABLE IF NOT EXISTS `cats` (
`id` int(11) NOT NULL,
`catName` varchar(20) NOT NULL,
`class` varchar(15) NOT NULL,
`term` varchar(4) NOT NULL,
`year` varchar(4) NOT NULL,
`status` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `cats`
--
INSERT INTO `cats` (`id`, `catName`, `class`, `term`, `year`, `status`) VALUES
(1, 'CAT 1', '3', 'I', '2020', 1);
-- --------------------------------------------------------
--
-- Table structure for table `catsubject`
--
CREATE TABLE IF NOT EXISTS `catsubject` (
`id` int(11) NOT NULL,
`catName` varchar(20) NOT NULL,
`status` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `catsubject`
--
INSERT INTO `catsubject` (`id`, `catName`, `status`) VALUES
(1, 'Humanities', 1);
-- --------------------------------------------------------
--
-- Table structure for table `cattotals`
--
CREATE TABLE IF NOT EXISTS `cattotals` (
`id` int(11) NOT NULL,
`studentReg` varchar(6) NOT NULL,
`exam` varchar(20) NOT NULL,
`total` int(11) NOT NULL,
`points` int(2) NOT NULL DEFAULT '0',
`MeanScore` varchar(4) NOT NULL,
`Grade` varchar(3) NOT NULL DEFAULT '--',
`Class` int(11) NOT NULL,
`Stream` varchar(16) NOT NULL,
`term` varchar(4) NOT NULL,
`year` varchar(4) NOT NULL,
`position` int(11) NOT NULL DEFAULT '0',
`StreamPosition` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `cattotals`
--
INSERT INTO `cattotals` (`id`, `studentReg`, `exam`, `total`, `points`, `MeanScore`, `Grade`, `Class`, `Stream`, `term`, `year`, `position`, `StreamPosition`) VALUES
(1, '4352', 'CAT 1', 89, 12, '12', 'A', 3, 'S', 'I', '2020', 1, 0),
(2, '4276', 'CAT 1', 78, 11, '11', 'A-', 3, 'J', 'I', '2020', 2, 0),
(3, '4325', 'CAT 1', 67, 9, '9', 'B', 3, 'M', 'I', '2020', 6, 0),
(4, '4308', 'CAT 1', 76, 11, '11', 'A-', 3, 'M', 'I', '2020', 5, 0),
(5, '4365', 'CAT 1', 78, 11, '11', 'A-', 3, 'R', 'I', '2020', 3, 0),
(6, '4406', 'CAT 1', 56, 7, '7', 'C+', 3, 'S', 'I', '2020', 8, 0),
(7, '4270', 'CAT 1', 45, 5, '5', 'C-', 3, 'M', 'I', '2020', 10, 0),
(8, '4387', 'CAT 1', 45, 5, '5', 'C-', 3, 'R', 'I', '2020', 9, 0),
(9, '4385', 'CAT 1', 67, 9, '9', 'B', 3, 'M', 'I', '2020', 7, 0),
(10, '4438', 'CAT 1', 78, 11, '11', 'A-', 3, 'R', 'I', '2020', 4, 0),
(11, '4324', 'CAT 1', 37, 12, '12', 'A', 3, 'S', 'I', '2020', 11, 0);
-- --------------------------------------------------------
--
-- Table structure for table `classes`
--
CREATE TABLE IF NOT EXISTS `classes` (
`id` int(11) NOT NULL,
`form` int(1) NOT NULL,
`stream` varchar(10) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `classes`
--
INSERT INTO `classes` (`id`, `form`, `stream`, `status`) VALUES
(1, 1, '0', 1),
(2, 2, '0', 1),
(3, 3, '0', 1),
(4, 4, '0', 1);
-- --------------------------------------------------------
--
-- Table structure for table `classmeans`
--
CREATE TABLE IF NOT EXISTS `classmeans` (
`id` int(11) NOT NULL,
`class` int(11) NOT NULL,
`stream` varchar(10) NOT NULL,
`term` varchar(4) NOT NULL,
`year` int(11) NOT NULL,
`exam` varchar(15) NOT NULL,
`total` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `club`
--
CREATE TABLE IF NOT EXISTS `club` (
`id` int(11) NOT NULL,
`clubName` varchar(20) NOT NULL,
`status` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `clubsmembers`
--
CREATE TABLE IF NOT EXISTS `clubsmembers` (
`id` int(11) NOT NULL,
`studentId` varchar(20) NOT NULL,
`club` varchar(20) NOT NULL,
`status` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `currentsession`
--
CREATE TABLE IF NOT EXISTS `currentsession` (
`id` int(11) NOT NULL,
`currentSession` varchar(10) NOT NULL DEFAULT 'I'
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `currentsession`
--
INSERT INTO `currentsession` (`id`, `currentSession`) VALUES
(1, 'I');
-- --------------------------------------------------------
--
-- Table structure for table `department`
--
CREATE TABLE IF NOT EXISTS `department` (
`id` int(11) NOT NULL,
`department` varchar(30) NOT NULL,
`status` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `department`
--
INSERT INTO `department` (`id`, `department`, `status`) VALUES
(1, 'Technicals', 1);
-- --------------------------------------------------------
--
-- Table structure for table `designation`
--
CREATE TABLE IF NOT EXISTS `designation` (
`id` int(11) NOT NULL,
`designation` varchar(30) NOT NULL,
`status` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `designation`
--
INSERT INTO `designation` (`id`, `designation`, `status`) VALUES
(1, 'hod technicals', 1);
-- --------------------------------------------------------
--
-- Table structure for table `dorm`
--
CREATE TABLE IF NOT EXISTS `dorm` (
`id` int(11) NOT NULL,
`dormName` varchar(20) NOT NULL,
`status` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `endadm`
--
CREATE TABLE IF NOT EXISTS `endadm` (
`endAdm` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `eresults`
--
CREATE TABLE IF NOT EXISTS `eresults` (
`id` int(11) NOT NULL,
`exam` varchar(50) NOT NULL,
`class` varchar(2) NOT NULL,
`year` varchar(4) NOT NULL,
`term` varchar(3) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `eresults`
--
INSERT INTO `eresults` (`id`, `exam`, `class`, `year`, `term`) VALUES
(1, 'CAT 1', '3', '2020', 'I'),
(2, 'CAT 1', '1', '2020', 'I'),
(3, 'END TERM', '3', '2019', 'I'),
(4, 'Opener Exam', '3', '2020', 'I'),
(5, 'Mid Term', '3', '2020', 'I'),
(6, 'Mid Term', '3', '2019', 'I');
-- --------------------------------------------------------
--
-- Table structure for table `examinations`
--
CREATE TABLE IF NOT EXISTS `examinations` (
`id` int(11) NOT NULL,
`examTitle` varchar(20) NOT NULL,
`Term` varchar(4) NOT NULL,
`Year` varchar(4) NOT NULL,
`Class` varchar(15) NOT NULL,
`status` int(1) NOT NULL DEFAULT '0',
`examTotalsUpdated` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `examinations`
--
INSERT INTO `examinations` (`id`, `examTitle`, `Term`, `Year`, `Class`, `status`, `examTotalsUpdated`) VALUES
(1, 'END TERM', 'III', '2019', 'All Classes', 1, 1),
(2, 'Opener Exam', 'III', '2019', 'All Classes', 1, 0),
(3, 'Mid Term', 'I', '2020', 'All Classes', 1, 0);
-- --------------------------------------------------------
--
-- Table structure for table `examresults`
--
CREATE TABLE IF NOT EXISTS `examresults` (
`id` int(11) NOT NULL,
`exam` varchar(20) NOT NULL,
`term` varchar(5) NOT NULL,
`Class` int(11) NOT NULL,
`Stream` varchar(10) NOT NULL,
`Year` varchar(4) NOT NULL,
`studentReg` varchar(7) NOT NULL,
`subject` varchar(100) NOT NULL,
`marks` int(11) NOT NULL,
`grade` varchar(3) DEFAULT NULL,
`status` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=775 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `examresults`
--
INSERT INTO `examresults` (`id`, `exam`, `term`, `Class`, `Stream`, `Year`, `studentReg`, `subject`, `marks`, `grade`, `status`) VALUES
(1, 'END TERM', 'III', 4, 'N', '2019', '002', 'English', 23, 'E', 1),
(2, 'END TERM', 'III', 4, 'N', '2019', '003', 'English', 44, 'D+', 0),
(3, 'END TERM', 'III', 4, 'N', '2019', '006', 'English', 34, 'D-', 1),
(4, 'END TERM', 'III', 4, 'N', '2019', '007', 'English', 45, 'C-', 0),
(5, 'END TERM', 'III', 4, 'N', '2019', '009', 'English', 56, 'C+', 0),
(6, 'END TERM', 'III', 4, 'N', '2019', '011', 'English', 54, 'C', 1),
(7, 'END TERM', 'III', 4, 'N', '2019', '012', 'English', 34, 'D-', 0),
(8, 'END TERM', 'III', 4, 'N', '2019', '014', 'English', 32, 'D-', 1),
(9, 'END TERM', 'III', 4, 'N', '2019', '015', 'English', 34, 'D-', 0),
(10, 'END TERM', 'III', 4, 'N', '2019', '016', 'English', 55, 'C+', 0),
(11, 'END TERM', 'III', 4, 'N', '2019', '020', 'English', 44, 'D+', 0),
(12, 'END TERM', 'III', 4, 'N', '2019', '022', 'English', 33, 'D-', 0),
(13, 'END TERM', 'III', 4, 'N', '2019', '024', 'English', 45, 'C-', 0),
(14, 'END TERM', 'III', 4, 'N', '2019', '025', 'English', 56, 'C+', 0),
(15, 'END TERM', 'III', 4, 'N', '2019', '090', 'English', 56, 'C+', 0),
(16, 'END TERM', 'III', 4, 'N', '2019', '094', 'English', 54, 'C', 0),
(17, 'END TERM', 'III', 4, 'N', '2019', '095', 'English', 34, 'D-', 0),
(18, 'END TERM', 'III', 4, 'N', '2019', '101', 'English', 32, 'D-', 0),
(19, 'END TERM', 'III', 4, 'N', '2019', '104', 'English', 34, 'D-', 0),
(20, 'END TERM', 'III', 4, 'N', '2019', '105', 'English', 34, 'D-', 0),
(21, 'END TERM', 'III', 4, 'N', '2019', '108', 'English', 34, 'D-', 0),
(22, 'END TERM', 'III', 4, 'N', '2019', '114', 'English', 32, 'D-', 0),
(23, 'END TERM', 'III', 4, 'N', '2019', '121', 'English', 34, 'D-', 0),
(24, 'END TERM', 'III', 4, 'N', '2019', '126', 'English', 56, 'C+', 0),
(25, 'END TERM', 'III', 4, 'N', '2019', '127', 'English', 55, 'C+', 0),
(26, 'END TERM', 'III', 4, 'N', '2019', '130', 'English', 44, 'D+', 0),
(27, 'END TERM', 'III', 4, 'N', '2019', '131', 'English', 44, 'D+', 0),
(28, 'END TERM', 'III', 4, 'N', '2019', '132', 'English', 34, 'D-', 0),
(29, 'END TERM', 'III', 4, 'N', '2019', '133', 'English', 33, 'D-', 0),
(30, 'END TERM', 'III', 4, 'N', '2019', '134', 'English', 21, 'E', 0),
(31, 'END TERM', 'III', 4, 'N', '2019', '137', 'English', 23, 'E', 0),
(32, 'END TERM', 'III', 4, 'N', '2019', '142', 'English', 21, 'E', 0),
(33, 'END TERM', 'III', 4, 'N', '2019', '143', 'English', 23, 'E', 0),
(34, 'END TERM', 'III', 4, 'N', '2019', '144', 'English', 34, 'D-', 0),
(35, 'END TERM', 'III', 4, 'N', '2019', '155', 'English', 54, 'C', 0),
(36, 'END TERM', 'III', 4, 'N', '2019', '202', 'English', 33, 'D-', 0),
(37, 'END TERM', 'III', 4, 'N', '2019', '203', 'English', 23, 'E', 0),
(38, 'END TERM', 'III', 4, 'N', '2019', '210', 'English', 21, 'E', 0),
(39, 'END TERM', 'III', 4, 'N', '2019', '218', 'English', 32, 'D-', 0),
(40, 'END TERM', 'III', 4, 'N', '2019', '219', 'English', 23, 'E', 0),
(41, 'END TERM', 'III', 4, 'N', '2019', '240', 'English', 45, 'C-', 0),
(42, 'END TERM', 'III', 4, 'N', '2019', '243', 'English', 43, 'D+', 0),
(43, 'END TERM', 'III', 4, 'N', '2019', '250', 'English', 33, 'D-', 0),
(44, 'END TERM', 'III', 4, 'N', '2019', '021', 'English', 23, 'E', 0),
(45, 'END TERM', 'III', 3, 'East', '2019', '026', 'English', 12, 'E', 0),
(46, 'END TERM', 'III', 3, 'East', '2019', '027', 'English', 34, 'D-', 0),
(47, 'END TERM', 'III', 3, 'East', '2019', '031', 'English', 32, 'D-', 0),
(48, 'END TERM', 'III', 3, 'East', '2019', '032', 'English', 34, 'D-', 0),
(49, 'END TERM', 'III', 3, 'East', '2019', '034', 'English', 32, 'D-', 0),
(50, 'END TERM', 'III', 3, 'East', '2019', '036', 'English', 3, 'E', 0),
(51, 'END TERM', 'III', 3, 'East', '2019', '040', 'English', 45, 'C-', 0),
(52, 'END TERM', 'III', 3, 'East', '2019', '043', 'English', 44, 'D+', 0),
(53, 'END TERM', 'III', 3, 'East', '2019', '047', 'English', 34, 'D-', 0),
(54, 'END TERM', 'III', 3, 'East', '2019', '049', 'English', 32, 'D-', 0),
(55, 'END TERM', 'III', 3, 'East', '2019', '052', 'English', 34, 'D-', 0),
(56, 'END TERM', 'III', 3, 'East', '2019', '053', 'English', 34, 'D-', 0),
(57, 'END TERM', 'III', 3, 'East', '2019', '055', 'English', 32, 'D-', 0),
(58, 'END TERM', 'III', 3, 'East', '2019', '057', 'English', 3, 'E', 0),
(59, 'END TERM', 'III', 3, 'East', '2019', '059', 'English', 55, 'C+', 0),
(60, 'END TERM', 'III', 3, 'East', '2019', '061', 'English', 45, 'C-', 0),
(61, 'END TERM', 'III', 3, 'East', '2019', '063', 'English', 43, 'D+', 0),
(62, 'END TERM', 'III', 3, 'East', '2019', '066', 'English', 44, 'D+', 0),
(63, 'END TERM', 'III', 3, 'East', '2019', '069', 'English', 34, 'D-', 0),
(64, 'END TERM', 'III', 3, 'East', '2019', '074', 'English', 4, 'E', 0),
(65, 'END TERM', 'III', 3, 'East', '2019', '077', 'English', 56, 'C+', 0),
(66, 'END TERM', 'III', 3, 'East', '2019', '078', 'English', 55, 'C+', 0),
(67, 'END TERM', 'III', 3, 'East', '2019', '082', 'English', 55, 'C+', 0),
(68, 'END TERM', 'III', 3, 'East', '2019', '088', 'English', 44, 'D+', 0),
(69, 'END TERM', 'III', 3, 'East', '2019', '093', 'English', 33, 'D-', 0),
(70, 'END TERM', 'III', 3, 'East', '2019', '103', 'English', 44, 'D+', 0),
(71, 'END TERM', 'III', 3, 'East', '2019', '111', 'English', 56, 'C+', 0),
(72, 'END TERM', 'III', 3, 'East', '2019', '112', 'English', 54, 'C', 0),
(73, 'END TERM', 'III', 3, 'East', '2019', '122', 'English', 44, 'D+', 0),
(74, 'END TERM', 'III', 3, 'East', '2019', '124', 'English', 34, 'D-', 0),
(75, 'END TERM', 'III', 3, 'East', '2019', '125', 'English', 32, 'D-', 0),
(76, 'END TERM', 'III', 3, 'East', '2019', '140', 'English', 34, 'D-', 0),
(77, 'END TERM', 'III', 3, 'East', '2019', '192', 'English', 45, 'C-', 0),
(78, 'END TERM', 'III', 3, 'East', '2019', '205', 'English', 43, 'D+', 0),
(79, 'END TERM', 'III', 3, 'East', '2019', '213', 'English', 45, 'C-', 0),
(80, 'END TERM', 'III', 3, 'East', '2019', '214', 'English', 43, 'D+', 0),
(81, 'END TERM', 'III', 3, 'East', '2019', '220', 'English', 44, 'D+', 0),
(82, 'END TERM', 'III', 3, 'East', '2019', '227', 'English', 34, 'D-', 0),
(83, 'END TERM', 'III', 3, 'East', '2019', '233', 'English', 32, 'D-', 0),
(84, 'END TERM', 'III', 3, 'East', '2019', '248', 'English', 21, 'E', 0),
(85, 'END TERM', 'III', 3, 'East', '2019', '026', 'Mathematics', 2, 'E', 0),
(86, 'END TERM', 'III', 3, 'East', '2019', '027', 'Mathematics', 3, 'E', 0),
(87, 'END TERM', 'III', 3, 'East', '2019', '031', 'Mathematics', 4, 'E', 0),
(88, 'END TERM', 'III', 3, 'East', '2019', '032', 'Mathematics', 4, 'E', 0),
(89, 'END TERM', 'III', 3, 'East', '2019', '034', 'Mathematics', 4, 'E', 0),
(90, 'END TERM', 'III', 3, 'East', '2019', '036', 'Mathematics', 4, 'E', 0),
(91, 'END TERM', 'III', 3, 'East', '2019', '040', 'Mathematics', 4, 'E', 0),
(92, 'END TERM', 'III', 3, 'East', '2019', '043', 'Mathematics', 3, 'E', 0),
(93, 'END TERM', 'III', 3, 'East', '2019', '047', 'Mathematics', 2, 'E', 0),
(94, 'END TERM', 'III', 3, 'East', '2019', '049', 'Mathematics', 3, 'E', 0),
(95, 'END TERM', 'III', 3, 'East', '2019', '052', 'Mathematics', 2, 'E', 0),
(96, 'END TERM', 'III', 3, 'East', '2019', '053', 'Mathematics', 3, 'E', 0),
(97, 'END TERM', 'III', 3, 'East', '2019', '055', 'Mathematics', 9, 'E', 0),
(98, 'END TERM', 'III', 3, 'East', '2019', '057', 'Mathematics', 8, 'E', 0),
(99, 'END TERM', 'III', 3, 'East', '2019', '059', 'Mathematics', 34, 'D-', 0),
(100, 'END TERM', 'III', 3, 'East', '2019', '061', 'Mathematics', 3, 'E', 0),
(101, 'END TERM', 'III', 3, 'East', '2019', '063', 'Mathematics', 2, 'E', 0),
(102, 'END TERM', 'III', 3, 'East', '2019', '066', 'Mathematics', 4, 'E', 0),
(103, 'END TERM', 'III', 3, 'East', '2019', '069', 'Mathematics', 5, 'E', 0),
(104, 'END TERM', 'III', 3, 'East', '2019', '074', 'Mathematics', 6, 'E', 0),
(105, 'END TERM', 'III', 3, 'East', '2019', '077', 'Mathematics', 5, 'E', 0),
(106, 'END TERM', 'III', 3, 'East', '2019', '078', 'Mathematics', 4, 'E', 0),
(107, 'END TERM', 'III', 3, 'East', '2019', '082', 'Mathematics', 3, 'E', 0),
(108, 'END TERM', 'III', 3, 'East', '2019', '088', 'Mathematics', 6, 'E', 0),
(109, 'END TERM', 'III', 3, 'East', '2019', '093', 'Mathematics', 5, 'E', 0),
(110, 'END TERM', 'III', 3, 'East', '2019', '103', 'Mathematics', 43, 'D+', 0),
(111, 'END TERM', 'III', 3, 'East', '2019', '111', 'Mathematics', 3, 'E', 0),
(112, 'END TERM', 'III', 3, 'East', '2019', '112', 'Mathematics', 4, 'E', 0),
(113, 'END TERM', 'III', 3, 'East', '2019', '122', 'Mathematics', 5, 'E', 0),
(114, 'END TERM', 'III', 3, 'East', '2019', '124', 'Mathematics', 6, 'E', 0),
(115, 'END TERM', 'III', 3, 'East', '2019', '125', 'Mathematics', 7, 'E', 0),
(116, 'END TERM', 'III', 3, 'East', '2019', '140', 'Mathematics', 6, 'E', 0),
(117, 'END TERM', 'III', 3, 'East', '2019', '192', 'Mathematics', 5, 'E', 0),
(118, 'END TERM', 'III', 3, 'East', '2019', '205', 'Mathematics', 5, 'E', 0),
(119, 'END TERM', 'III', 3, 'East', '2019', '213', 'Mathematics', 1, 'E', 0),
(120, 'END TERM', 'III', 3, 'East', '2019', '214', 'Mathematics', 2, 'E', 0),
(121, 'END TERM', 'III', 3, 'East', '2019', '220', 'Mathematics', 3, 'E', 0),
(122, 'END TERM', 'III', 3, 'East', '2019', '227', 'Mathematics', 3, 'E', 0),
(123, 'END TERM', 'III', 3, 'East', '2019', '233', 'Mathematics', 4, 'E', 0),
(124, 'END TERM', 'III', 3, 'East', '2019', '248', 'Mathematics', 34, 'D-', 0),
(125, 'END TERM', 'III', 3, 'East', '2019', '026', 'Physic', 1, 'E', 0),
(126, 'END TERM', 'III', 3, 'East', '2019', '027', 'Physic', 1, 'E', 0),
(127, 'END TERM', 'III', 3, 'East', '2019', '031', 'Physic', 1, 'E', 0),
(128, 'END TERM', 'III', 3, 'East', '2019', '032', 'Physic', 1, 'E', 0),
(129, 'END TERM', 'III', 3, 'East', '2019', '034', 'Physic', 2, 'E', 0),
(130, 'END TERM', 'III', 3, 'East', '2019', '036', 'Physic', 3, 'E', 0),
(131, 'END TERM', 'III', 3, 'East', '2019', '040', 'Physic', 4, 'E', 0),
(132, 'END TERM', 'III', 3, 'East', '2019', '043', 'Physic', 5, 'E', 0),
(133, 'END TERM', 'III', 3, 'East', '2019', '047', 'Physic', 6, 'E', 0),
(134, 'END TERM', 'III', 3, 'East', '2019', '049', 'Physic', 7, 'E', 0),
(135, 'END TERM', 'III', 3, 'East', '2019', '052', 'Physic', 8, 'E', 0),
(136, 'END TERM', 'III', 3, 'East', '2019', '053', 'Physic', 9, 'E', 0),
(137, 'END TERM', 'III', 3, 'East', '2019', '055', 'Physic', 6, 'E', 0),
(138, 'END TERM', 'III', 3, 'East', '2019', '057', 'Physic', 55, 'C+', 0),
(139, 'END TERM', 'III', 3, 'East', '2019', '059', 'Physic', 43, 'D+', 0),
(140, 'END TERM', 'III', 3, 'East', '2019', '061', 'Physic', 4, 'E', 0),
(141, 'END TERM', 'III', 3, 'East', '2019', '063', 'Physic', 55, 'C+', 0),
(142, 'END TERM', 'III', 3, 'East', '2019', '066', 'Physic', 4, 'E', 0),
(143, 'END TERM', 'III', 3, 'East', '2019', '069', 'Physic', 34, 'D-', 0),
(144, 'END TERM', 'III', 3, 'East', '2019', '074', 'Physic', 32, 'D-', 0),
(145, 'END TERM', 'III', 3, 'East', '2019', '077', 'Physic', 34, 'D-', 0),
(146, 'END TERM', 'III', 3, 'East', '2019', '078', 'Physic', 56, 'C+', 0),
(147, 'END TERM', 'III', 3, 'East', '2019', '082', 'Physic', 67, 'B', 0),
(148, 'END TERM', 'III', 3, 'East', '2019', '088', 'Physic', 65, 'B', 0),
(149, 'END TERM', 'III', 3, 'East', '2019', '093', 'Physic', 54, 'C', 0),
(150, 'END TERM', 'III', 3, 'East', '2019', '103', 'Physic', 45, 'C-', 0),
(151, 'END TERM', 'III', 3, 'East', '2019', '111', 'Physic', 43, 'D+', 0),
(152, 'END TERM', 'III', 3, 'East', '2019', '112', 'Physic', 43, 'D+', 0),
(153, 'END TERM', 'III', 3, 'East', '2019', '122', 'Physic', 3, 'E', 0),
(154, 'END TERM', 'III', 3, 'East', '2019', '124', 'Physic', 4, 'E', 0),
(155, 'END TERM', 'III', 3, 'East', '2019', '125', 'Physic', 56, 'C+', 0),
(156, 'END TERM', 'III', 3, 'East', '2019', '140', 'Physic', 66, 'B', 0),
(157, 'END TERM', 'III', 3, 'East', '2019', '192', 'Physic', 55, 'C+', 0),
(158, 'END TERM', 'III', 3, 'East', '2019', '205', 'Physic', 44, 'D+', 0),
(159, 'END TERM', 'III', 3, 'East', '2019', '213', 'Physic', 34, 'D-', 0),
(160, 'END TERM', 'III', 3, 'East', '2019', '214', 'Physic', 32, 'D-', 0),
(161, 'END TERM', 'III', 3, 'East', '2019', '220', 'Physic', 33, 'D-', 0),
(162, 'END TERM', 'III', 3, 'East', '2019', '227', 'Physic', 44, 'D+', 0),
(163, 'END TERM', 'III', 3, 'East', '2019', '233', 'Physic', 34, 'D-', 0),
(164, 'END TERM', 'III', 3, 'East', '2019', '248', 'Physic', 32, 'D-', 0),
(165, 'END TERM', 'III', 3, 'East', '2019', '026', 'Business Studies', 34, 'D-', 0),
(166, 'END TERM', 'III', 3, 'East', '2019', '027', 'Business Studies', 34, 'D-', 0),
(167, 'END TERM', 'III', 3, 'East', '2019', '031', 'Business Studies', 44, 'D+', 0),
(168, 'END TERM', 'III', 3, 'East', '2019', '032', 'Business Studies', 55, 'C+', 0),
(169, 'END TERM', 'III', 3, 'East', '2019', '034', 'Business Studies', 45, 'C-', 0),
(170, 'END TERM', 'III', 3, 'East', '2019', '036', 'Business Studies', 54, 'C', 0),
(171, 'END TERM', 'III', 3, 'East', '2019', '040', 'Business Studies', 5, 'E', 0),
(172, 'END TERM', 'III', 3, 'East', '2019', '043', 'Business Studies', 6, 'E', 0),
(173, 'END TERM', 'III', 3, 'East', '2019', '047', 'Business Studies', 77, 'A-', 0),
(174, 'END TERM', 'III', 3, 'East', '2019', '049', 'Business Studies', 65, 'B', 0),
(175, 'END TERM', 'III', 3, 'East', '2019', '052', 'Business Studies', 45, 'C-', 0),
(176, 'END TERM', 'III', 3, 'East', '2019', '053', 'Business Studies', 43, 'D+', 0),
(177, 'END TERM', 'III', 3, 'East', '2019', '055', 'Business Studies', 23, 'E', 0),
(178, 'END TERM', 'III', 3, 'East', '2019', '057', 'Business Studies', 21, 'E', 0),
(179, 'END TERM', 'III', 3, 'East', '2019', '059', 'Business Studies', 12, 'E', 0),
(180, 'END TERM', 'III', 3, 'East', '2019', '061', 'Business Studies', 45, 'C-', 0),
(181, 'END TERM', 'III', 3, 'East', '2019', '063', 'Business Studies', 43, 'D+', 0),
(182, 'END TERM', 'III', 3, 'East', '2019', '066', 'Business Studies', 45, 'C-', 0),
(183, 'END TERM', 'III', 3, 'East', '2019', '069', 'Business Studies', 56, 'C+', 0),
(184, 'END TERM', 'III', 3, 'East', '2019', '074', 'Business Studies', 66, 'B', 0),
(185, 'END TERM', 'III', 3, 'East', '2019', '077', 'Business Studies', 54, 'C', 0),
(186, 'END TERM', 'III', 3, 'East', '2019', '078', 'Business Studies', 54, 'C', 0),
(187, 'END TERM', 'III', 3, 'East', '2019', '082', 'Business Studies', 43, 'D+', 0),
(188, 'END TERM', 'III', 3, 'East', '2019', '088', 'Business Studies', 34, 'D-', 0),
(189, 'END TERM', 'III', 3, 'East', '2019', '093', 'Business Studies', 32, 'D-', 0),
(190, 'END TERM', 'III', 3, 'East', '2019', '103', 'Business Studies', 34, 'D-', 0),
(191, 'END TERM', 'III', 3, 'East', '2019', '111', 'Business Studies', 45, 'C-', 0),
(192, 'END TERM', 'III', 3, 'East', '2019', '112', 'Business Studies', 65, 'B', 0),
(193, 'END TERM', 'III', 3, 'East', '2019', '122', 'Business Studies', 55, 'C+', 0),
(194, 'END TERM', 'III', 3, 'East', '2019', '124', 'Business Studies', 43, 'D+', 0),
(195, 'END TERM', 'III', 3, 'East', '2019', '125', 'Business Studies', 45, 'C-', 0),
(196, 'END TERM', 'III', 3, 'East', '2019', '140', 'Business Studies', 43, 'D+', 0),
(197, 'END TERM', 'III', 3, 'East', '2019', '192', 'Business Studies', 43, 'D+', 0),
(198, 'END TERM', 'III', 3, 'East', '2019', '205', 'Business Studies', 45, 'C-', 0),
(199, 'END TERM', 'III', 3, 'East', '2019', '213', 'Business Studies', 56, 'C+', 0),
(200, 'END TERM', 'III', 3, 'East', '2019', '214', 'Business Studies', 56, 'C+', 0),
(201, 'END TERM', 'III', 3, 'East', '2019', '220', 'Business Studies', 54, 'C', 0),
(202, 'END TERM', 'III', 3, 'East', '2019', '227', 'Business Studies', 32, 'D-', 0),
(203, 'END TERM', 'III', 3, 'East', '2019', '233', 'Business Studies', 55, 'C+', 0),
(204, 'END TERM', 'III', 3, 'East', '2019', '248', 'Business Studies', 44, 'D+', 0),
(205, 'END TERM', 'III', 3, 'East', '2019', '026', 'Chemistry', 12, 'E', 0),
(206, 'END TERM', 'III', 3, 'East', '2019', '027', 'Chemistry', 23, 'E', 0),
(207, 'END TERM', 'III', 3, 'East', '2019', '031', 'Chemistry', 24, 'E', 0),
(208, 'END TERM', 'III', 3, 'East', '2019', '032', 'Chemistry', 21, 'E', 0),
(209, 'END TERM', 'III', 3, 'East', '2019', '034', 'Chemistry', 22, 'E', 0),
(210, 'END TERM', 'III', 3, 'East', '2019', '036', 'Chemistry', 12, 'E', 0),
(211, 'END TERM', 'III', 3, 'East', '2019', '040', 'Chemistry', 34, 'D-', 0),
(212, 'END TERM', 'III', 3, 'East', '2019', '043', 'Chemistry', 34, 'D-', 0),
(213, 'END TERM', 'III', 3, 'East', '2019', '047', 'Chemistry', 45, 'C-', 0),
(214, 'END TERM', 'III', 3, 'East', '2019', '049', 'Chemistry', 43, 'D+', 0),
(215, 'END TERM', 'III', 3, 'East', '2019', '052', 'Chemistry', 44, 'D+', 0),
(216, 'END TERM', 'III', 3, 'East', '2019', '053', 'Chemistry', 32, 'D-', 0),
(217, 'END TERM', 'III', 3, 'East', '2019', '055', 'Chemistry', 23, 'E', 0),
(218, 'END TERM', 'III', 3, 'East', '2019', '057', 'Chemistry', 23, 'E', 0),
(219, 'END TERM', 'III', 3, 'East', '2019', '059', 'Chemistry', 56, 'C+', 0),
(220, 'END TERM', 'III', 3, 'East', '2019', '061', 'Chemistry', 55, 'C+', 0),
(221, 'END TERM', 'III', 3, 'East', '2019', '063', 'Chemistry', 45, 'C-', 0),
(222, 'END TERM', 'III', 3, 'East', '2019', '066', 'Chemistry', 43, 'D+', 0),
(223, 'END TERM', 'III', 3, 'East', '2019', '069', 'Chemistry', 43, 'D+', 0),
(224, 'END TERM', 'III', 3, 'East', '2019', '074', 'Chemistry', 33, 'D-', 0),
(225, 'END TERM', 'III', 3, 'East', '2019', '077', 'Chemistry', 4, 'E', 0),
(226, 'END TERM', 'III', 3, 'East', '2019', '078', 'Chemistry', 6, 'E', 0),
(227, 'END TERM', 'III', 3, 'East', '2019', '082', 'Chemistry', 7, 'E', 0),
(228, 'END TERM', 'III', 3, 'East', '2019', '088', 'Chemistry', 8, 'E', 0),
(229, 'END TERM', 'III', 3, 'East', '2019', '093', 'Chemistry', 7, 'E', 0),
(230, 'END TERM', 'III', 3, 'East', '2019', '103', 'Chemistry', 23, 'E', 0),
(231, 'END TERM', 'III', 3, 'East', '2019', '111', 'Chemistry', 23, 'E', 0),
(232, 'END TERM', 'III', 3, 'East', '2019', '112', 'Chemistry', 34, 'D-', 0),
(233, 'END TERM', 'III', 3, 'East', '2019', '122', 'Chemistry', 54, 'C', 0),
(234, 'END TERM', 'III', 3, 'East', '2019', '124', 'Chemistry', 43, 'D+', 0),
(235, 'END TERM', 'III', 3, 'East', '2019', '125', 'Chemistry', 23, 'E', 0),
(236, 'END TERM', 'III', 3, 'East', '2019', '140', 'Chemistry', 45, 'C-', 0),
(237, 'END TERM', 'III', 3, 'East', '2019', '192', 'Chemistry', 56, 'C+', 0),
(238, 'END TERM', 'III', 3, 'East', '2019', '205', 'Chemistry', 54, 'C', 0),
(239, 'END TERM', 'III', 3, 'East', '2019', '213', 'Chemistry', 34, 'D-', 0),
(240, 'END TERM', 'III', 3, 'East', '2019', '214', 'Chemistry', 32, 'D-', 0),
(241, 'END TERM', 'III', 3, 'East', '2019', '220', 'Chemistry', 34, 'D-', 0),
(242, 'END TERM', 'III', 3, 'East', '2019', '227', 'Chemistry', 43, 'D+', 0),
(243, 'END TERM', 'III', 3, 'East', '2019', '233', 'Chemistry', 22, 'E', 0),
(244, 'END TERM', 'III', 3, 'East', '2019', '248', 'Chemistry', 33, 'D-', 0),
(245, 'END TERM', 'III', 3, 'East', '2019', '026', 'History', 33, 'D-', 0),
(246, 'END TERM', 'III', 3, 'East', '2019', '027', 'History', 45, 'C-', 0),
(247, 'END TERM', 'III', 3, 'East', '2019', '031', 'History', 55, 'C+', 0),
(248, 'END TERM', 'III', 3, 'East', '2019', '032', 'History', 55, 'C+', 0),
(249, 'END TERM', 'III', 3, 'East', '2019', '034', 'History', 45, 'C-', 0),
(250, 'END TERM', 'III', 3, 'East', '2019', '036', 'History', 56, 'C+', 0),
(251, 'END TERM', 'III', 3, 'East', '2019', '040', 'History', 66, 'B', 0),
(252, 'END TERM', 'III', 3, 'East', '2019', '043', 'History', 65, 'B', 0),
(253, 'END TERM', 'III', 3, 'East', '2019', '047', 'History', 54, 'C', 0),
(254, 'END TERM', 'III', 3, 'East', '2019', '049', 'History', 45, 'C-', 0),
(255, 'END TERM', 'III', 3, 'East', '2019', '052', 'History', 45, 'C-', 0),
(256, 'END TERM', 'III', 3, 'East', '2019', '053', 'History', 45, 'C-', 0),
(257, 'END TERM', 'III', 3, 'East', '2019', '055', 'History', 66, 'B', 0),
(258, 'END TERM', 'III', 3, 'East', '2019', '057', 'History', 65, 'B', 0),
(259, 'END TERM', 'III', 3, 'East', '2019', '059', 'History', 54, 'C', 0),
(260, 'END TERM', 'III', 3, 'East', '2019', '061', 'History', 45, 'C-', 0),
(261, 'END TERM', 'III', 3, 'East', '2019', '063', 'History', 43, 'D+', 0),
(262, 'END TERM', 'III', 3, 'East', '2019', '066', 'History', 45, 'C-', 0),
(263, 'END TERM', 'III', 3, 'East', '2019', '069', 'History', 43, 'D+', 0),
(264, 'END TERM', 'III', 3, 'East', '2019', '074', 'History', 44, 'D+', 0),
(265, 'END TERM', 'III', 3, 'East', '2019', '077', 'History', 55, 'C+', 0),
(266, 'END TERM', 'III', 3, 'East', '2019', '078', 'History', 56, 'C+', 0),
(267, 'END TERM', 'III', 3, 'East', '2019', '082', 'History', 55, 'C+', 0),
(268, 'END TERM', 'III', 3, 'East', '2019', '088', 'History', 44, 'D+', 0),
(269, 'END TERM', 'III', 3, 'East', '2019', '093', 'History', 33, 'D-', 0),
(270, 'END TERM', 'III', 3, 'East', '2019', '103', 'History', 23, 'E', 0),
(271, 'END TERM', 'III', 3, 'East', '2019', '111', 'History', 32, 'D-', 0),
(272, 'END TERM', 'III', 3, 'East', '2019', '112', 'History', 31, 'D-', 0),
(273, 'END TERM', 'III', 3, 'East', '2019', '122', 'History', 3, 'E', 0),
(274, 'END TERM', 'III', 3, 'East', '2019', '124', 'History', 23, 'E', 0),
(275, 'END TERM', 'III', 3, 'East', '2019', '125', 'History', 45, 'C-', 0),
(276, 'END TERM', 'III', 3, 'East', '2019', '140', 'History', 45, 'C-', 0),
(277, 'END TERM', 'III', 3, 'East', '2019', '192', 'History', 43, 'D+', 0),
(278, 'END TERM', 'III', 3, 'East', '2019', '205', 'History', 44, 'D+', 0),
(279, 'END TERM', 'III', 3, 'East', '2019', '213', 'History', 67, 'B', 0),
(280, 'END TERM', 'III', 3, 'East', '2019', '214', 'History', 76, 'A-', 0),
(281, 'END TERM', 'III', 3, 'East', '2019', '220', 'History', 55, 'C+', 0),
(282, 'END TERM', 'III', 3, 'East', '2019', '227', 'History', 45, 'C-', 0),
(283, 'END TERM', 'III', 3, 'East', '2019', '233', 'History', 55, 'C+', 0),
(284, 'END TERM', 'III', 3, 'East', '2019', '248', 'History', 43, 'D+', 0),
(285, 'END TERM', 'III', 3, 'East', '2019', '026', 'Biology', 12, 'E', 0),
(286, 'END TERM', 'III', 3, 'East', '2019', '027', 'Biology', 21, 'E', 0),
(287, 'END TERM', 'III', 3, 'East', '2019', '031', 'Biology', 2, 'E', 0),
(288, 'END TERM', 'III', 3, 'East', '2019', '032', 'Biology', 3, 'E', 0),
(289, 'END TERM', 'III', 3, 'East', '2019', '034', 'Biology', 4, 'E', 0),
(290, 'END TERM', 'III', 3, 'East', '2019', '036', 'Biology', 5, 'E', 0),
(291, 'END TERM', 'III', 3, 'East', '2019', '040', 'Biology', 6, 'E', 0),
(292, 'END TERM', 'III', 3, 'East', '2019', '043', 'Biology', 6, 'E', 0),
(293, 'END TERM', 'III', 3, 'East', '2019', '047', 'Biology', 6, 'E', 0),
(294, 'END TERM', 'III', 3, 'East', '2019', '049', 'Biology', 6, 'E', 0),
(295, 'END TERM', 'III', 3, 'East', '2019', '052', 'Biology', 6, 'E', 0),
(296, 'END TERM', 'III', 3, 'East', '2019', '053', 'Biology', 9, 'E', 0),
(297, 'END TERM', 'III', 3, 'East', '2019', '055', 'Biology', 8, 'E', 0),
(298, 'END TERM', 'III', 3, 'East', '2019', '057', 'Biology', 7, 'E', 0),
(299, 'END TERM', 'III', 3, 'East', '2019', '059', 'Biology', 6, 'E', 0),
(300, 'END TERM', 'III', 3, 'East', '2019', '061', 'Biology', 5, 'E', 0),
(301, 'END TERM', 'III', 3, 'East', '2019', '063', 'Biology', 4, 'E', 0),
(302, 'END TERM', 'III', 3, 'East', '2019', '066', 'Biology', 33, 'D-', 0),
(303, 'END TERM', 'III', 3, 'East', '2019', '069', 'Biology', 45, 'C-', 0),
(304, 'END TERM', 'III', 3, 'East', '2019', '074', 'Biology', 5, 'E', 0),
(305, 'END TERM', 'III', 3, 'East', '2019', '077', 'Biology', 6, 'E', 0),
(306, 'END TERM', 'III', 3, 'East', '2019', '078', 'Biology', 7, 'E', 0),
(307, 'END TERM', 'III', 3, 'East', '2019', '082', 'Biology', 8, 'E', 0),
(308, 'END TERM', 'III', 3, 'East', '2019', '088', 'Biology', 9, 'E', 0),
(309, 'END TERM', 'III', 3, 'East', '2019', '093', 'Biology', 8, 'E', 0),
(310, 'END TERM', 'III', 3, 'East', '2019', '103', 'Biology', 7, 'E', 0),
(311, 'END TERM', 'III', 3, 'East', '2019', '111', 'Biology', 6, 'E', 0),
(312, 'END TERM', 'III', 3, 'East', '2019', '112', 'Biology', 5, 'E', 0),
(313, 'END TERM', 'III', 3, 'East', '2019', '122', 'Biology', 4, 'E', 0),
(314, 'END TERM', 'III', 3, 'East', '2019', '124', 'Biology', 3, 'E', 0),
(315, 'END TERM', 'III', 3, 'East', '2019', '125', 'Biology', 33, 'D-', 0),
(316, 'END TERM', 'III', 3, 'East', '2019', '140', 'Biology', 23, 'E', 0),
(317, 'END TERM', 'III', 3, 'East', '2019', '192', 'Biology', 21, 'E', 0),
(318, 'END TERM', 'III', 3, 'East', '2019', '205', 'Biology', 31, 'D-', 0),
(319, 'END TERM', 'III', 3, 'East', '2019', '213', 'Biology', 23, 'E', 0),
(320, 'END TERM', 'III', 3, 'East', '2019', '214', 'Biology', 4, 'E', 0),
(321, 'END TERM', 'III', 3, 'East', '2019', '220', 'Biology', 6, 'E', 0),
(322, 'END TERM', 'III', 3, 'East', '2019', '227', 'Biology', 7, 'E', 0),
(323, 'END TERM', 'III', 3, 'East', '2019', '233', 'Biology', 8, 'E', 0),
(324, 'END TERM', 'III', 3, 'East', '2019', '248', 'Biology', 9, 'E', 0),
(325, 'END TERM', 'III', 3, 'East', '2019', '026', 'CRE', 44, 'D+', 0),
(326, 'END TERM', 'III', 3, 'East', '2019', '027', 'CRE', 45, 'C-', 0),
(327, 'END TERM', 'III', 3, 'East', '2019', '031', 'CRE', 45, 'C-', 0),
(328, 'END TERM', 'III', 3, 'East', '2019', '032', 'CRE', 43, 'D+', 0),
(329, 'END TERM', 'III', 3, 'East', '2019', '034', 'CRE', 43, 'D+', 0),
(330, 'END TERM', 'III', 3, 'East', '2019', '036', 'CRE', 45, 'C-', 0),
(331, 'END TERM', 'III', 3, 'East', '2019', '040', 'CRE', 46, 'C-', 0),
(332, 'END TERM', 'III', 3, 'East', '2019', '043', 'CRE', 67, 'B', 0),
(333, 'END TERM', 'III', 3, 'East', '2019', '047', 'CRE', 67, 'B', 0),
(334, 'END TERM', 'III', 3, 'East', '2019', '049', 'CRE', 65, 'B', 0),
(335, 'END TERM', 'III', 3, 'East', '2019', '052', 'CRE', 65, 'B', 0),
(336, 'END TERM', 'III', 3, 'East', '2019', '053', 'CRE', 56, 'C+', 0),
(337, 'END TERM', 'III', 3, 'East', '2019', '055', 'CRE', 54, 'C', 0),
(338, 'END TERM', 'III', 3, 'East', '2019', '057', 'CRE', 54, 'C', 0),
(339, 'END TERM', 'III', 3, 'East', '2019', '059', 'CRE', 45, 'C-', 0),
(340, 'END TERM', 'III', 3, 'East', '2019', '061', 'CRE', 43, 'D+', 0),
(341, 'END TERM', 'III', 3, 'East', '2019', '063', 'CRE', 34, 'D-', 0),
(342, 'END TERM', 'III', 3, 'East', '2019', '066', 'CRE', 32, 'D-', 0),
(343, 'END TERM', 'III', 3, 'East', '2019', '069', 'CRE', 32, 'D-', 0),
(344, 'END TERM', 'III', 3, 'East', '2019', '074', 'CRE', 33, 'D-', 0),
(345, 'END TERM', 'III', 3, 'East', '2019', '077', 'CRE', 45, 'C-', 0),
(346, 'END TERM', 'III', 3, 'East', '2019', '078', 'CRE', 54, 'C', 0),
(347, 'END TERM', 'III', 3, 'East', '2019', '082', 'CRE', 45, 'C-', 0),
(348, 'END TERM', 'III', 3, 'East', '2019', '088', 'CRE', 56, 'C+', 0),
(349, 'END TERM', 'III', 3, 'East', '2019', '093', 'CRE', 54, 'C', 0),
(350, 'END TERM', 'III', 3, 'East', '2019', '103', 'CRE', 55, 'C+', 0),
(351, 'END TERM', 'III', 3, 'East', '2019', '111', 'CRE', 66, 'B', 0),
(352, 'END TERM', 'III', 3, 'East', '2019', '112', 'CRE', 65, 'B', 0),
(353, 'END TERM', 'III', 3, 'East', '2019', '122', 'CRE', 65, 'B', 0),
(354, 'END TERM', 'III', 3, 'East', '2019', '124', 'CRE', 56, 'C+', 0),
(355, 'END TERM', 'III', 3, 'East', '2019', '125', 'CRE', 67, 'B', 0),
(356, 'END TERM', 'III', 3, 'East', '2019', '140', 'CRE', 88, 'A', 0),
(357, 'END TERM', 'III', 3, 'East', '2019', '192', 'CRE', 76, 'A-', 0),
(358, 'END TERM', 'III', 3, 'East', '2019', '205', 'CRE', 56, 'C+', 0),
(359, 'END TERM', 'III', 3, 'East', '2019', '213', 'CRE', 45, 'C-', 0),
(360, 'END TERM', 'III', 3, 'East', '2019', '214', 'CRE', 43, 'D+', 0),
(361, 'END TERM', 'III', 3, 'East', '2019', '220', 'CRE', 45, 'C-', 0),
(362, 'END TERM', 'III', 3, 'East', '2019', '227', 'CRE', 55, 'C+', 0),
(363, 'END TERM', 'III', 3, 'East', '2019', '233', 'CRE', 65, 'B', 0),
(364, 'END TERM', 'III', 3, 'East', '2019', '248', 'CRE', 55, 'C+', 0),
(365, 'END TERM', 'III', 3, 'West', '2019', '028', 'English', 33, 'D-', 0),
(366, 'END TERM', 'III', 3, 'West', '2019', '029', 'English', 34, 'D-', 0),
(367, 'END TERM', 'III', 3, 'West', '2019', '033', 'English', 34, 'D-', 0),
(368, 'END TERM', 'III', 3, 'West', '2019', '035', 'English', 44, 'D+', 0),
(369, 'END TERM', 'III', 3, 'West', '2019', '039', 'English', 55, 'C+', 0),
(370, 'END TERM', 'III', 3, 'West', '2019', '042', 'English', 45, 'C-', 0),
(371, 'END TERM', 'III', 3, 'West', '2019', '044', 'English', 43, 'D+', 0),
(372, 'END TERM', 'III', 3, 'West', '2019', '045', 'English', 45, 'C-', 0),
(373, 'END TERM', 'III', 3, 'West', '2019', '046', 'English', 56, 'C+', 0),
(374, 'END TERM', 'III', 3, 'West', '2019', '048', 'English', 54, 'C', 0),
(375, 'END TERM', 'III', 3, 'West', '2019', '050', 'English', 5, 'E', 0),
(376, 'END TERM', 'III', 3, 'West', '2019', '051', 'English', 54, 'C', 0),
(377, 'END TERM', 'III', 3, 'West', '2019', '054', 'English', 5, 'E', 0),
(378, 'END TERM', 'III', 3, 'West', '2019', '056', 'English', 8, 'E', 0),
(379, 'END TERM', 'III', 3, 'West', '2019', '060', 'English', 7, 'E', 0),
(380, 'END TERM', 'III', 3, 'West', '2019', '062', 'English', 45, 'C-', 0),
(381, 'END TERM', 'III', 3, 'West', '2019', '068', 'English', 4, 'E', 0),
(382, 'END TERM', 'III', 3, 'West', '2019', '073', 'English', 22, 'E', 0),
(383, 'END TERM', 'III', 3, 'West', '2019', '079', 'English', 23, 'E', 0),
(384, 'END TERM', 'III', 3, 'West', '2019', '080', 'English', 23, 'E', 0),
(385, 'END TERM', 'III', 3, 'West', '2019', '081', 'English', 24, 'E', 0),
(386, 'END TERM', 'III', 3, 'West', '2019', '085', 'English', 24, 'E', 0),
(387, 'END TERM', 'III', 3, 'West', '2019', '089', 'English', 21, 'E', 0),
(388, 'END TERM', 'III', 3, 'West', '2019', '091', 'English', 4, 'E', 0),
(389, 'END TERM', 'III', 3, 'West', '2019', '099', 'English', 5, 'E', 0),
(390, 'END TERM', 'III', 3, 'West', '2019', '102', 'English', 6, 'E', 0),
(391, 'END TERM', 'III', 3, 'West', '2019', '109', 'English', 5, 'E', 0),
(392, 'END TERM', 'III', 3, 'West', '2019', '117', 'English', 4, 'E', 0),
(393, 'END TERM', 'III', 3, 'West', '2019', '120', 'English', 3, 'E', 0),
(394, 'END TERM', 'III', 3, 'West', '2019', '123', 'English', 2, 'E', 0),
(395, 'END TERM', 'III', 3, 'West', '2019', '135', 'English', 3, 'E', 0),
(396, 'END TERM', 'III', 3, 'West', '2019', '139', 'English', 4, 'E', 0),
(397, 'END TERM', 'III', 3, 'West', '2019', '141', 'English', 44, 'D+', 0),
(398, 'END TERM', 'III', 3, 'West', '2019', '232', 'English', 33, 'D-', 0),
(399, 'END TERM', 'III', 3, 'West', '2019', '242', 'English', 34, 'D-', 0),
(400, 'END TERM', 'III', 3, 'West', '2019', '247', 'English', 32, 'D-', 0),
(401, 'END TERM', 'III', 3, 'West', '2019', '092', 'English', 32, 'D-', 0),
(402, 'END TERM', 'III', 3, 'West', '2019', '038', 'English', 21, 'E', 0),
(403, 'END TERM', 'III', 3, 'West', '2019', '028', 'Kiswahili', 23, 'E', 0),
(404, 'END TERM', 'III', 3, 'West', '2019', '029', 'Kiswahili', 21, 'E', 0),
(405, 'END TERM', 'III', 3, 'West', '2019', '033', 'Kiswahili', 22, 'E', 0),
(406, 'END TERM', 'III', 3, 'West', '2019', '035', 'Kiswahili', 33, 'D-', 0),
(407, 'END TERM', 'III', 3, 'West', '2019', '039', 'Kiswahili', 44, 'D+', 0),
(408, 'END TERM', 'III', 3, 'West', '2019', '042', 'Kiswahili', 44, 'D+', 0),
(409, 'END TERM', 'III', 3, 'West', '2019', '044', 'Kiswahili', 44, 'D+', 0),
(410, 'END TERM', 'III', 3, 'West', '2019', '045', 'Kiswahili', 34, 'D-', 0),
(411, 'END TERM', 'III', 3, 'West', '2019', '046', 'Kiswahili', 34, 'D-', 0),
(412, 'END TERM', 'III', 3, 'West', '2019', '048', 'Kiswahili', 32, 'D-', 0),
(413, 'END TERM', 'III', 3, 'West', '2019', '050', 'Kiswahili', 23, 'E', 0),
(414, 'END TERM', 'III', 3, 'West', '2019', '051', 'Kiswahili', 23, 'E', 0),
(415, 'END TERM', 'III', 3, 'West', '2019', '054', 'Kiswahili', 21, 'E', 0),
(416, 'END TERM', 'III', 3, 'West', '2019', '056', 'Kiswahili', 21, 'E', 0),
(417, 'END TERM', 'III', 3, 'West', '2019', '060', 'Kiswahili', 23, 'E', 0),
(418, 'END TERM', 'III', 3, 'West', '2019', '062', 'Kiswahili', 23, 'E', 0),
(419, 'END TERM', 'III', 3, 'West', '2019', '068', 'Kiswahili', 22, 'E', 0),
(420, 'END TERM', 'III', 3, 'West', '2019', '073', 'Kiswahili', 22, 'E', 0),
(421, 'END TERM', 'III', 3, 'West', '2019', '079', 'Kiswahili', 22, 'E', 0),
(422, 'END TERM', 'III', 3, 'West', '2019', '080', 'Kiswahili', 22, 'E', 0),
(423, 'END TERM', 'III', 3, 'West', '2019', '081', 'Kiswahili', 6, 'E', 0),
(424, 'END TERM', 'III', 3, 'West', '2019', '085', 'Kiswahili', 7, 'E', 0),
(425, 'END TERM', 'III', 3, 'West', '2019', '089', 'Kiswahili', 8, 'E', 0),
(426, 'END TERM', 'III', 3, 'West', '2019', '091', 'Kiswahili', 9, 'E', 0),
(427, 'END TERM', 'III', 3, 'West', '2019', '099', 'Kiswahili', 8, 'E', 0),
(428, 'END TERM', 'III', 3, 'West', '2019', '102', 'Kiswahili', 7, 'E', 0),
(429, 'END TERM', 'III', 3, 'West', '2019', '109', 'Kiswahili', 6, 'E', 0),
(430, 'END TERM', 'III', 3, 'West', '2019', '117', 'Kiswahili', 5, 'E', 0),
(431, 'END TERM', 'III', 3, 'West', '2019', '120', 'Kiswahili', 55, 'C+', 0),
(432, 'END TERM', 'III', 3, 'West', '2019', '123', 'Kiswahili', 4, 'E', 0),
(433, 'END TERM', 'III', 3, 'West', '2019', '135', 'Kiswahili', 4, 'E', 0),
(434, 'END TERM', 'III', 3, 'West', '2019', '139', 'Kiswahili', 34, 'D-', 0),
(435, 'END TERM', 'III', 3, 'West', '2019', '141', 'Kiswahili', 34, 'D-', 0),
(436, 'END TERM', 'III', 3, 'West', '2019', '232', 'Kiswahili', 35, 'D', 0),
(437, 'END TERM', 'III', 3, 'West', '2019', '242', 'Kiswahili', 32, 'D-', 0),
(438, 'END TERM', 'III', 3, 'West', '2019', '247', 'Kiswahili', 23, 'E', 0),
(439, 'END TERM', 'III', 3, 'West', '2019', '092', 'Kiswahili', 21, 'E', 0),
(440, 'END TERM', 'III', 3, 'West', '2019', '038', 'Kiswahili', 21, 'E', 0),
(441, 'END TERM', 'III', 3, 'West', '2019', '028', 'Mathematics', 2, 'E', 0),
(442, 'END TERM', 'III', 3, 'West', '2019', '029', 'Mathematics', 3, 'E', 0),
(443, 'END TERM', 'III', 3, 'West', '2019', '033', 'Mathematics', 4, 'E', 0),
(444, 'END TERM', 'III', 3, 'West', '2019', '035', 'Mathematics', 5, 'E', 0),
(445, 'END TERM', 'III', 3, 'West', '2019', '039', 'Mathematics', 6, 'E', 0),
(446, 'END TERM', 'III', 3, 'West', '2019', '042', 'Mathematics', 7, 'E', 0),
(447, 'END TERM', 'III', 3, 'West', '2019', '044', 'Mathematics', 8, 'E', 0),
(448, 'END TERM', 'III', 3, 'West', '2019', '045', 'Mathematics', 9, 'E', 0),
(449, 'END TERM', 'III', 3, 'West', '2019', '046', 'Mathematics', 8, 'E', 0),
(450, 'END TERM', 'III', 3, 'West', '2019', '048', 'Mathematics', 7, 'E', 0),
(451, 'END TERM', 'III', 3, 'West', '2019', '050', 'Mathematics', 6, 'E', 0),
(452, 'END TERM', 'III', 3, 'West', '2019', '051', 'Mathematics', 5, 'E', 0),
(453, 'END TERM', 'III', 3, 'West', '2019', '054', 'Mathematics', 4, 'E', 0),
(454, 'END TERM', 'III', 3, 'West', '2019', '056', 'Mathematics', 3, 'E', 0),
(455, 'END TERM', 'III', 3, 'West', '2019', '060', 'Mathematics', 2, 'E', 0),
(456, 'END TERM', 'III', 3, 'West', '2019', '062', 'Mathematics', 1, 'E', 0),
(457, 'END TERM', 'III', 3, 'West', '2019', '068', 'Mathematics', 2, 'E', 0),
(458, 'END TERM', 'III', 3, 'West', '2019', '073', 'Mathematics', 3, 'E', 0),
(459, 'END TERM', 'III', 3, 'West', '2019', '079', 'Mathematics', 4, 'E', 0),
(460, 'END TERM', 'III', 3, 'West', '2019', '080', 'Mathematics', 5, 'E', 0),
(461, 'END TERM', 'III', 3, 'West', '2019', '081', 'Mathematics', 55, 'C+', 0),
(462, 'END TERM', 'III', 3, 'West', '2019', '085', 'Mathematics', 6, 'E', 0),
(463, 'END TERM', 'III', 3, 'West', '2019', '089', 'Mathematics', 7, 'E', 0),
(464, 'END TERM', 'III', 3, 'West', '2019', '091', 'Mathematics', 8, 'E', 0),
(465, 'END TERM', 'III', 3, 'West', '2019', '099', 'Mathematics', 9, 'E', 0),
(466, 'END TERM', 'III', 3, 'West', '2019', '102', 'Mathematics', 8, 'E', 0),
(467, 'END TERM', 'III', 3, 'West', '2019', '109', 'Mathematics', 7, 'E', 0),
(468, 'END TERM', 'III', 3, 'West', '2019', '117', 'Mathematics', 6, 'E', 0),
(469, 'END TERM', 'III', 3, 'West', '2019', '120', 'Mathematics', 55, 'C+', 0),
(470, 'END TERM', 'III', 3, 'West', '2019', '123', 'Mathematics', 44, 'D+', 0),
(471, 'END TERM', 'III', 3, 'West', '2019', '135', 'Mathematics', 33, 'D-', 0),
(472, 'END TERM', 'III', 3, 'West', '2019', '139', 'Mathematics', 22, 'E', 0),
(473, 'END TERM', 'III', 3, 'West', '2019', '141', 'Mathematics', 11, 'E', 0),
(474, 'END TERM', 'III', 3, 'West', '2019', '232', 'Mathematics', 23, 'E', 0),
(475, 'END TERM', 'III', 3, 'West', '2019', '242', 'Mathematics', 24, 'E', 0),
(476, 'END TERM', 'III', 3, 'West', '2019', '247', 'Mathematics', 25, 'E', 0),
(477, 'END TERM', 'III', 3, 'West', '2019', '092', 'Mathematics', 4, 'E', 0),
(478, 'END TERM', 'III', 3, 'West', '2019', '038', 'Mathematics', 5, 'E', 0),
(479, 'END TERM', 'III', 3, 'West', '2019', '028', 'Biology', 2, 'E', 0),
(480, 'END TERM', 'III', 3, 'West', '2019', '029', 'Biology', 3, 'E', 0),
(481, 'END TERM', 'III', 3, 'West', '2019', '033', 'Biology', 4, 'E', 0),
(482, 'END TERM', 'III', 3, 'West', '2019', '035', 'Biology', 5, 'E', 0),
(483, 'END TERM', 'III', 3, 'West', '2019', '039', 'Biology', 6, 'E', 0),
(484, 'END TERM', 'III', 3, 'West', '2019', '042', 'Biology', 7, 'E', 0),
(485, 'END TERM', 'III', 3, 'West', '2019', '044', 'Biology', 8, 'E', 0),
(486, 'END TERM', 'III', 3, 'West', '2019', '045', 'Biology', 9, 'E', 0),
(487, 'END TERM', 'III', 3, 'West', '2019', '046', 'Biology', 8, 'E', 0),
(488, 'END TERM', 'III', 3, 'West', '2019', '048', 'Biology', 7, 'E', 0),
(489, 'END TERM', 'III', 3, 'West', '2019', '050', 'Biology', 6, 'E', 0),
(490, 'END TERM', 'III', 3, 'West', '2019', '051', 'Biology', 5, 'E', 0),
(491, 'END TERM', 'III', 3, 'West', '2019', '054', 'Biology', 4, 'E', 0),
(492, 'END TERM', 'III', 3, 'West', '2019', '056', 'Biology', 3, 'E', 0),
(493, 'END TERM', 'III', 3, 'West', '2019', '060', 'Biology', 22, 'E', 0),
(494, 'END TERM', 'III', 3, 'West', '2019', '062', 'Biology', 1, 'E', 0),
(495, 'END TERM', 'III', 3, 'West', '2019', '068', 'Biology', 2, 'E', 0),
(496, 'END TERM', 'III', 3, 'West', '2019', '073', 'Biology', 3, 'E', 0),
(497, 'END TERM', 'III', 3, 'West', '2019', '079', 'Biology', 44, 'D+', 0),
(498, 'END TERM', 'III', 3, 'West', '2019', '080', 'Biology', 5, 'E', 0),
(499, 'END TERM', 'III', 3, 'West', '2019', '081', 'Biology', 6, 'E', 0),
(500, 'END TERM', 'III', 3, 'West', '2019', '085', 'Biology', 7, 'E', 0),
(501, 'END TERM', 'III', 3, 'West', '2019', '089', 'Biology', 8, 'E', 0),
(502, 'END TERM', 'III', 3, 'West', '2019', '091', 'Biology', 9, 'E', 0),
(503, 'END TERM', 'III', 3, 'West', '2019', '099', 'Biology', 8, 'E', 0),
(504, 'END TERM', 'III', 3, 'West', '2019', '102', 'Biology', 7, 'E', 0),
(505, 'END TERM', 'III', 3, 'West', '2019', '109', 'Biology', 66, 'B', 0),
(506, 'END TERM', 'III', 3, 'West', '2019', '117', 'Biology', 5, 'E', 0),
(507, 'END TERM', 'III', 3, 'West', '2019', '120', 'Biology', 45, 'C-', 0),
(508, 'END TERM', 'III', 3, 'West', '2019', '123', 'Biology', 4, 'E', 0),
(509, 'END TERM', 'III', 3, 'West', '2019', '135', 'Biology', 33, 'D-', 0),
(510, 'END TERM', 'III', 3, 'West', '2019', '139', 'Biology', 23, 'E', 0),
(511, 'END TERM', 'III', 3, 'West', '2019', '141', 'Biology', 21, 'E', 0),
(512, 'END TERM', 'III', 3, 'West', '2019', '232', 'Biology', 23, 'E', 0),
(513, 'END TERM', 'III', 3, 'West', '2019', '242', 'Biology', 23, 'E', 0),
(514, 'END TERM', 'III', 3, 'West', '2019', '247', 'Biology', 34, 'D-', 0),
(515, 'END TERM', 'III', 3, 'West', '2019', '092', 'Biology', 3, 'E', 0),
(516, 'END TERM', 'III', 3, 'West', '2019', '038', 'Biology', 4, 'E', 0),
(517, 'END TERM', 'III', 3, 'West', '2019', '028', 'Physic', 2, 'E', 0),
(518, 'END TERM', 'III', 3, 'West', '2019', '029', 'Physic', 3, 'E', 0),
(519, 'END TERM', 'III', 3, 'West', '2019', '033', 'Physic', 4, 'E', 0),
(520, 'END TERM', 'III', 3, 'West', '2019', '035', 'Physic', 5, 'E', 0),
(521, 'END TERM', 'III', 3, 'West', '2019', '039', 'Physic', 6, 'E', 0),
(522, 'END TERM', 'III', 3, 'West', '2019', '042', 'Physic', 7, 'E', 0),
(523, 'END TERM', 'III', 3, 'West', '2019', '044', 'Physic', 8, 'E', 0),
(524, 'END TERM', 'III', 3, 'West', '2019', '045', 'Physic', 9, 'E', 0),
(525, 'END TERM', 'III', 3, 'West', '2019', '046', 'Physic', 8, 'E', 0),
(526, 'END TERM', 'III', 3, 'West', '2019', '048', 'Physic', 7, 'E', 0),
(527, 'END TERM', 'III', 3, 'West', '2019', '050', 'Physic', 6, 'E', 0),
(528, 'END TERM', 'III', 3, 'West', '2019', '051', 'Physic', 5, 'E', 0),
(529, 'END TERM', 'III', 3, 'West', '2019', '054', 'Physic', 4, 'E', 0),
(530, 'END TERM', 'III', 3, 'West', '2019', '056', 'Physic', 3, 'E', 0),
(531, 'END TERM', 'III', 3, 'West', '2019', '060', 'Physic', 2, 'E', 0),
(532, 'END TERM', 'III', 3, 'West', '2019', '062', 'Physic', 11, 'E', 0),
(533, 'END TERM', 'III', 3, 'West', '2019', '068', 'Physic', 2, 'E', 0),
(534, 'END TERM', 'III', 3, 'West', '2019', '073', 'Physic', 3, 'E', 0),
(535, 'END TERM', 'III', 3, 'West', '2019', '079', 'Physic', 4, 'E', 0),
(536, 'END TERM', 'III', 3, 'West', '2019', '080', 'Physic', 5, 'E', 0),
(537, 'END TERM', 'III', 3, 'West', '2019', '081', 'Physic', 66, 'B', 0),
(538, 'END TERM', 'III', 3, 'West', '2019', '085', 'Physic', 7, 'E', 0),
(539, 'END TERM', 'III', 3, 'West', '2019', '089', 'Physic', 8, 'E', 0),
(540, 'END TERM', 'III', 3, 'West', '2019', '091', 'Physic', 9, 'E', 0),
(541, 'END TERM', 'III', 3, 'West', '2019', '099', 'Physic', 8, 'E', 0),
(542, 'END TERM', 'III', 3, 'West', '2019', '102', 'Physic', 7, 'E', 0),
(543, 'END TERM', 'III', 3, 'West', '2019', '109', 'Physic', 6, 'E', 0),
(544, 'END TERM', 'III', 3, 'West', '2019', '117', 'Physic', 5, 'E', 0),
(545, 'END TERM', 'III', 3, 'West', '2019', '120', 'Physic', 4, 'E', 0),
(546, 'END TERM', 'III', 3, 'West', '2019', '123', 'Physic', 3, 'E', 0),
(547, 'END TERM', 'III', 3, 'West', '2019', '135', 'Physic', 2, 'E', 0),
(548, 'END TERM', 'III', 3, 'West', '2019', '139', 'Physic', 1, 'E', 0),
(549, 'END TERM', 'III', 3, 'West', '2019', '141', 'Physic', 2, 'E', 0),
(550, 'END TERM', 'III', 3, 'West', '2019', '232', 'Physic', 3, 'E', 0),
(551, 'END TERM', 'III', 3, 'West', '2019', '242', 'Physic', 4, 'E', 0),
(552, 'END TERM', 'III', 3, 'West', '2019', '247', 'Physic', 5, 'E', 0),
(553, 'END TERM', 'III', 3, 'West', '2019', '092', 'Physic', 6, 'E', 0),
(554, 'END TERM', 'III', 3, 'West', '2019', '038', 'Physic', 7, 'E', 0),
(555, 'END TERM', 'III', 3, 'West', '2019', '028', 'Chemistry', 23, 'E', 0),
(556, 'END TERM', 'III', 3, 'West', '2019', '029', 'Chemistry', 2, 'E', 0),
(557, 'END TERM', 'III', 3, 'West', '2019', '033', 'Chemistry', 33, 'D-', 0),
(558, 'END TERM', 'III', 3, 'West', '2019', '035', 'Chemistry', 45, 'C-', 0),
(559, 'END TERM', 'III', 3, 'West', '2019', '039', 'Chemistry', 5, 'E', 0),
(560, 'END TERM', 'III', 3, 'West', '2019', '042', 'Chemistry', 5, 'E', 0),
(561, 'END TERM', 'III', 3, 'West', '2019', '044', 'Chemistry', 5, 'E', 0),
(562, 'END TERM', 'III', 3, 'West', '2019', '045', 'Chemistry', 45, 'C-', 0),
(563, 'END TERM', 'III', 3, 'West', '2019', '046', 'Chemistry', 54, 'C', 0),
(564, 'END TERM', 'III', 3, 'West', '2019', '048', 'Chemistry', 34, 'D-', 0),
(565, 'END TERM', 'III', 3, 'West', '2019', '050', 'Chemistry', 3, 'E', 0),
(566, 'END TERM', 'III', 3, 'West', '2019', '051', 'Chemistry', 6, 'E', 0),
(567, 'END TERM', 'III', 3, 'West', '2019', '054', 'Chemistry', 7, 'E', 0),
(568, 'END TERM', 'III', 3, 'West', '2019', '056', 'Chemistry', 8, 'E', 0),
(569, 'END TERM', 'III', 3, 'West', '2019', '060', 'Chemistry', 8, 'E', 0),
(570, 'END TERM', 'III', 3, 'West', '2019', '062', 'Chemistry', 7, 'E', 0),
(571, 'END TERM', 'III', 3, 'West', '2019', '068', 'Chemistry', 9, 'E', 0),
(572, 'END TERM', 'III', 3, 'West', '2019', '073', 'Chemistry', 7, 'E', 0),
(573, 'END TERM', 'III', 3, 'West', '2019', '079', 'Chemistry', 6, 'E', 0),
(574, 'END TERM', 'III', 3, 'West', '2019', '080', 'Chemistry', 5, 'E', 0),
(575, 'END TERM', 'III', 3, 'West', '2019', '081', 'Chemistry', 4, 'E', 0),
(576, 'END TERM', 'III', 3, 'West', '2019', '085', 'Chemistry', 3, 'E', 0),
(577, 'END TERM', 'III', 3, 'West', '2019', '089', 'Chemistry', 23, 'E', 0),
(578, 'END TERM', 'III', 3, 'West', '2019', '091', 'Chemistry', 32, 'D-', 0),
(579, 'END TERM', 'III', 3, 'West', '2019', '099', 'Chemistry', 31, 'D-', 0),
(580, 'END TERM', 'III', 3, 'West', '2019', '102', 'Chemistry', 23, 'E', 0),
(581, 'END TERM', 'III', 3, 'West', '2019', '109', 'Chemistry', 34, 'D-', 0),
(582, 'END TERM', 'III', 3, 'West', '2019', '117', 'Chemistry', 43, 'D+', 0),
(583, 'END TERM', 'III', 3, 'West', '2019', '120', 'Chemistry', 45, 'C-', 0),
(584, 'END TERM', 'III', 3, 'West', '2019', '123', 'Chemistry', 46, 'C-', 0),
(585, 'END TERM', 'III', 3, 'West', '2019', '135', 'Chemistry', 5, 'E', 0),
(586, 'END TERM', 'III', 3, 'West', '2019', '139', 'Chemistry', 4, 'E', 0),
(587, 'END TERM', 'III', 3, 'West', '2019', '141', 'Chemistry', 5, 'E', 0),
(588, 'END TERM', 'III', 3, 'West', '2019', '232', 'Chemistry', 3, 'E', 0),
(589, 'END TERM', 'III', 3, 'West', '2019', '242', 'Chemistry', 7, 'E', 0),
(590, 'END TERM', 'III', 3, 'West', '2019', '247', 'Chemistry', 8, 'E', 0),
(591, 'END TERM', 'III', 3, 'West', '2019', '092', 'Chemistry', 9, 'E', 0),
(592, 'END TERM', 'III', 3, 'West', '2019', '038', 'Chemistry', 7, 'E', 0),
(593, 'END TERM', 'III', 3, 'West', '2019', '028', 'History', 23, 'E', 0),
(594, 'END TERM', 'III', 3, 'West', '2019', '029', 'History', 34, 'D-', 0),
(595, 'END TERM', 'III', 3, 'West', '2019', '033', 'History', 5, 'E', 0),
(596, 'END TERM', 'III', 3, 'West', '2019', '035', 'History', 45, 'C-', 0),
(597, 'END TERM', 'III', 3, 'West', '2019', '039', 'History', 43, 'D+', 0),
(598, 'END TERM', 'III', 3, 'West', '2019', '042', 'History', 45, 'C-', 0),
(599, 'END TERM', 'III', 3, 'West', '2019', '044', 'History', 55, 'C+', 0),
(600, 'END TERM', 'III', 3, 'West', '2019', '045', 'History', 65, 'B', 0),
(601, 'END TERM', 'III', 3, 'West', '2019', '046', 'History', 66, 'B', 0),
(602, 'END TERM', 'III', 3, 'West', '2019', '048', 'History', 76, 'A-', 0),
(603, 'END TERM', 'III', 3, 'West', '2019', '050', 'History', 65, 'B', 0),
(604, 'END TERM', 'III', 3, 'West', '2019', '051', 'History', 45, 'C-', 0),
(605, 'END TERM', 'III', 3, 'West', '2019', '054', 'History', 43, 'D+', 0),
(606, 'END TERM', 'III', 3, 'West', '2019', '056', 'History', 45, 'C-', 0),
(607, 'END TERM', 'III', 3, 'West', '2019', '060', 'History', 43, 'D+', 0),
(608, 'END TERM', 'III', 3, 'West', '2019', '062', 'History', 43, 'D+', 0),
(609, 'END TERM', 'III', 3, 'West', '2019', '068', 'History', 34, 'D-', 0),
(610, 'END TERM', 'III', 3, 'West', '2019', '073', 'History', 55, 'C+', 0),
(611, 'END TERM', 'III', 3, 'West', '2019', '079', 'History', 66, 'B', 0),
(612, 'END TERM', 'III', 3, 'West', '2019', '080', 'History', 67, 'B', 0),
(613, 'END TERM', 'III', 3, 'West', '2019', '081', 'History', 67, 'B', 0),
(614, 'END TERM', 'III', 3, 'West', '2019', '085', 'History', 65, 'B', 0),
(615, 'END TERM', 'III', 3, 'West', '2019', '089', 'History', 45, 'C-', 0),
(616, 'END TERM', 'III', 3, 'West', '2019', '091', 'History', 43, 'D+', 0),
(617, 'END TERM', 'III', 3, 'West', '2019', '099', 'History', 45, 'C-', 0),
(618, 'END TERM', 'III', 3, 'West', '2019', '102', 'History', 66, 'B', 0),
(619, 'END TERM', 'III', 3, 'West', '2019', '109', 'History', 34, 'D-', 0),
(620, 'END TERM', 'III', 3, 'West', '2019', '117', 'History', 32, 'D-', 0),
(621, 'END TERM', 'III', 3, 'West', '2019', '120', 'History', 34, 'D-', 0),
(622, 'END TERM', 'III', 3, 'West', '2019', '123', 'History', 56, 'C+', 0),
(623, 'END TERM', 'III', 3, 'West', '2019', '135', 'History', 54, 'C', 0),
(624, 'END TERM', 'III', 3, 'West', '2019', '139', 'History', 77, 'A-', 0),
(625, 'END TERM', 'III', 3, 'West', '2019', '141', 'History', 65, 'B', 0),
(626, 'END TERM', 'III', 3, 'West', '2019', '232', 'History', 45, 'C-', 0),
(627, 'END TERM', 'III', 3, 'West', '2019', '242', 'History', 43, 'D+', 0),
(628, 'END TERM', 'III', 3, 'West', '2019', '247', 'History', 45, 'C-', 0),
(629, 'END TERM', 'III', 3, 'West', '2019', '092', 'History', 43, 'D+', 0),
(630, 'END TERM', 'III', 3, 'West', '2019', '038', 'History', 45, 'C-', 0),
(631, 'END TERM', 'III', 3, 'West', '2019', '028', 'Business Studies', 34, 'D-', 0),
(632, 'END TERM', 'III', 3, 'West', '2019', '029', 'Business Studies', 55, 'C+', 0),
(633, 'END TERM', 'III', 3, 'West', '2019', '033', 'Business Studies', 65, 'B', 0),
(634, 'END TERM', 'III', 3, 'West', '2019', '035', 'Business Studies', 45, 'C-', 0),
(635, 'END TERM', 'III', 3, 'West', '2019', '039', 'Business Studies', 43, 'D+', 0),
(636, 'END TERM', 'III', 3, 'West', '2019', '042', 'Business Studies', 45, 'C-', 0),
(637, 'END TERM', 'III', 3, 'West', '2019', '044', 'Business Studies', 43, 'D+', 0),
(638, 'END TERM', 'III', 3, 'West', '2019', '045', 'Business Studies', 45, 'C-', 0),
(639, 'END TERM', 'III', 3, 'West', '2019', '046', 'Business Studies', 66, 'B', 0),
(640, 'END TERM', 'III', 3, 'West', '2019', '048', 'Business Studies', 67, 'B', 0),
(641, 'END TERM', 'III', 3, 'West', '2019', '050', 'Business Studies', 76, 'A-', 0),
(642, 'END TERM', 'III', 3, 'West', '2019', '051', 'Business Studies', 56, 'C+', 0),
(643, 'END TERM', 'III', 3, 'West', '2019', '054', 'Business Studies', 55, 'C+', 0),
(644, 'END TERM', 'III', 3, 'West', '2019', '056', 'Business Studies', 67, 'B', 0),
(645, 'END TERM', 'III', 3, 'West', '2019', '060', 'Business Studies', 76, 'A-', 0),
(646, 'END TERM', 'III', 3, 'West', '2019', '062', 'Business Studies', 65, 'B', 0),
(647, 'END TERM', 'III', 3, 'West', '2019', '068', 'Business Studies', 56, 'C+', 0),
(648, 'END TERM', 'III', 3, 'West', '2019', '073', 'Business Studies', 54, 'C', 0),
(649, 'END TERM', 'III', 3, 'West', '2019', '079', 'Business Studies', 45, 'C-', 0),
(650, 'END TERM', 'III', 3, 'West', '2019', '080', 'Business Studies', 56, 'C+', 0),
(651, 'END TERM', 'III', 3, 'West', '2019', '081', 'Business Studies', 67, 'B', 0),
(652, 'END TERM', 'III', 3, 'West', '2019', '085', 'Business Studies', 78, 'A-', 0),
(653, 'END TERM', 'III', 3, 'West', '2019', '089', 'Business Studies', 76, 'A-', 0),
(654, 'END TERM', 'III', 3, 'West', '2019', '091', 'Business Studies', 76, 'A-', 0),
(655, 'END TERM', 'III', 3, 'West', '2019', '099', 'Business Studies', 54, 'C', 0),
(656, 'END TERM', 'III', 3, 'West', '2019', '102', 'Business Studies', 56, 'C+', 0),
(657, 'END TERM', 'III', 3, 'West', '2019', '109', 'Business Studies', 78, 'A-', 0),
(658, 'END TERM', 'III', 3, 'West', '2019', '117', 'Business Studies', 76, 'A-', 0),
(659, 'END TERM', 'III', 3, 'West', '2019', '120', 'Business Studies', 55, 'C+', 0),
(660, 'END TERM', 'III', 3, 'West', '2019', '123', 'Business Studies', 65, 'B', 0),
(661, 'END TERM', 'III', 3, 'West', '2019', '135', 'Business Studies', 45, 'C-', 0),
(662, 'END TERM', 'III', 3, 'West', '2019', '139', 'Business Studies', 55, 'C+', 0),
(663, 'END TERM', 'III', 3, 'West', '2019', '141', 'Business Studies', 56, 'C+', 0),
(664, 'END TERM', 'III', 3, 'West', '2019', '232', 'Business Studies', 54, 'C', 0),
(665, 'END TERM', 'III', 3, 'West', '2019', '242', 'Business Studies', 56, 'C+', 0),
(666, 'END TERM', 'III', 3, 'West', '2019', '247', 'Business Studies', 54, 'C', 0),
(667, 'END TERM', 'III', 3, 'West', '2019', '092', 'Business Studies', 54, 'C', 0),
(668, 'END TERM', 'III', 3, 'West', '2019', '038', 'Business Studies', 55, 'C+', 0),
(669, 'Opener Exam', 'III', 2, 'East', '2019', '145', 'English', 45, 'C-', 0),
(670, 'Opener Exam', 'III', 2, 'East', '2019', '146', 'English', 45, 'C-', 0),
(671, 'Opener Exam', 'III', 2, 'West', '2019', '147', 'English', 45, 'C-', 0);
INSERT INTO `examresults` (`id`, `exam`, `term`, `Class`, `Stream`, `Year`, `studentReg`, `subject`, `marks`, `grade`, `status`) VALUES
(672, 'Opener Exam', 'III', 2, 'West', '2019', '148', 'English', 56, 'C+', 0),
(673, 'Opener Exam', 'III', 2, 'West', '2019', '149', 'English', 56, 'C+', 0),
(674, 'Opener Exam', 'III', 2, 'West', '2019', '150', 'English', 67, 'B', 0),
(675, 'Opener Exam', 'III', 2, 'East', '2019', '151', 'English', 76, 'A-', 0),
(676, 'Opener Exam', 'III', 2, 'West', '2019', '152', 'English', 67, 'B', 0),
(677, 'Opener Exam', 'III', 2, 'West', '2019', '153', 'English', 67, 'B', 0),
(678, 'Opener Exam', 'III', 2, 'East', '2019', '154', 'English', 78, 'A-', 0),
(679, 'Opener Exam', 'III', 2, 'East', '2019', '156', 'English', 78, 'A-', 0),
(680, 'Opener Exam', 'III', 2, 'East', '2019', '157', 'English', 78, 'A-', 0),
(681, 'Opener Exam', 'III', 2, 'West', '2019', '158', 'English', 78, 'A-', 0),
(682, 'Opener Exam', 'III', 2, 'East', '2019', '159', 'English', 78, 'A-', 0),
(683, 'Opener Exam', 'III', 2, 'East', '2019', '160', 'English', 89, 'A', 0),
(684, 'Opener Exam', 'III', 2, 'West', '2019', '161', 'English', 89, 'A', 0),
(685, 'Opener Exam', 'III', 2, 'West', '2019', '162', 'English', 89, 'A', 0),
(686, 'Opener Exam', 'III', 2, 'West', '2019', '163', 'English', 89, 'A', 0),
(687, 'Opener Exam', 'III', 2, 'West', '2019', '164', 'English', 90, 'A', 0),
(688, 'Opener Exam', 'III', 2, 'East', '2019', '165', 'English', 89, 'A', 0),
(689, 'Opener Exam', 'III', 2, 'West', '2019', '166', 'English', 98, 'A', 0),
(690, 'Opener Exam', 'III', 2, 'West', '2019', '168', 'English', 89, 'A', 0),
(691, 'Opener Exam', 'III', 2, 'West', '2019', '169', 'English', 78, 'A-', 0),
(692, 'Opener Exam', 'III', 2, 'West', '2019', '170', 'English', 76, 'A-', 0),
(693, 'Opener Exam', 'III', 2, 'West', '2019', '171', 'English', 76, 'A-', 0),
(694, 'Opener Exam', 'III', 2, 'East', '2019', '172', 'English', 76, 'A-', 0),
(695, 'Opener Exam', 'III', 2, 'West', '2019', '173', 'English', 45, 'C-', 0),
(696, 'Opener Exam', 'III', 2, 'East', '2019', '174', 'English', 45, 'C-', 0),
(697, 'Opener Exam', 'III', 2, 'East', '2019', '175', 'English', 45, 'C-', 0),
(698, 'Opener Exam', 'III', 2, 'East', '2019', '176', 'English', 34, 'D-', 0),
(699, 'Opener Exam', 'III', 2, 'East', '2019', '177', 'English', 34, 'D-', 0),
(700, 'Opener Exam', 'III', 2, 'West', '2019', '180', 'English', 34, 'D-', 0),
(701, 'Opener Exam', 'III', 2, 'West', '2019', '181', 'English', 34, 'D-', 0),
(702, 'Opener Exam', 'III', 2, 'East', '2019', '182', 'English', 43, 'D+', 0),
(703, 'Opener Exam', 'III', 2, 'West', '2019', '183', 'English', 45, 'C-', 0),
(704, 'Opener Exam', 'III', 2, 'West', '2019', '184', 'English', 45, 'C-', 0),
(705, 'Opener Exam', 'III', 2, 'East', '2019', '185', 'English', 45, 'C-', 0),
(706, 'Opener Exam', 'III', 2, 'West', '2019', '186', 'English', 45, 'C-', 0),
(707, 'Opener Exam', 'III', 2, 'West', '2019', '187', 'English', 45, 'C-', 0),
(708, 'Opener Exam', 'III', 2, 'West', '2019', '189', 'English', 45, 'C-', 0),
(709, 'Opener Exam', 'III', 2, 'East', '2019', '194', 'English', 56, 'C+', 0),
(710, 'Opener Exam', 'III', 2, 'East', '2019', '196', 'English', 56, 'C+', 0),
(711, 'Opener Exam', 'III', 2, 'East', '2019', '197', 'English', 56, 'C+', 0),
(712, 'Opener Exam', 'III', 2, 'West', '2019', '198', 'English', 56, 'C+', 0),
(713, 'Opener Exam', 'III', 2, 'East', '2019', '199', 'English', 56, 'C+', 0),
(714, 'Opener Exam', 'III', 2, 'West', '2019', '200', 'English', 56, 'C+', 0),
(715, 'Opener Exam', 'III', 2, 'West', '2019', '204', 'English', 56, 'C+', 0),
(716, 'Opener Exam', 'III', 2, 'East', '2019', '206', 'English', 56, 'C+', 0),
(717, 'Opener Exam', 'III', 2, 'West', '2019', '207', 'English', 56, 'C+', 0),
(718, 'Opener Exam', 'III', 2, 'East', '2019', '208', 'English', 56, 'C+', 0),
(719, 'Opener Exam', 'III', 2, 'East', '2019', '209', 'English', 90, 'A', 0),
(720, 'Opener Exam', 'III', 2, 'East', '2019', '211', 'English', 90, 'A', 0),
(721, 'Opener Exam', 'III', 2, 'East', '2019', '212', 'English', 90, 'A', 0),
(722, 'Opener Exam', 'III', 2, 'West', '2019', '215', 'English', 90, 'A', 0),
(723, 'Opener Exam', 'III', 2, 'West', '2019', '217', 'English', 90, 'A', 0),
(724, 'Opener Exam', 'III', 2, 'East', '2019', '221', 'English', 9, 'E', 0),
(725, 'Opener Exam', 'III', 2, 'West', '2019', '222', 'English', 9, 'E', 0),
(726, 'Opener Exam', 'III', 2, 'West', '2019', '223', 'English', 9, 'E', 0),
(727, 'Opener Exam', 'III', 2, 'West', '2019', '224', 'English', 90, 'A', 0),
(728, 'Opener Exam', 'III', 2, 'East', '2019', '225', 'English', 90, 'A', 0),
(729, 'Opener Exam', 'III', 2, 'East', '2019', '226', 'English', 9, 'E', 0),
(730, 'Opener Exam', 'III', 2, 'East', '2019', '228', 'English', 9, 'E', 0),
(731, 'Opener Exam', 'III', 2, 'West', '2019', '229', 'English', 9, 'E', 0),
(732, 'Opener Exam', 'III', 2, 'West', '2019', '230', 'English', 90, 'A', 0),
(733, 'Opener Exam', 'III', 2, 'West', '2019', '241', 'English', 90, 'A', 0),
(734, 'Opener Exam', 'III', 2, 'East', '2019', '245', 'English', 90, 'A', 0),
(735, 'Opener Exam', 'III', 2, 'East', '2019', '249', 'English', 9, 'E', 0),
(736, 'Opener Exam', 'III', 2, 'West', '2019', '246', 'English', 9, 'E', 0),
(737, 'Opener Exam', 'III', 2, 'West', '2019', '251', 'English', 78, 'A-', 0),
(738, 'Opener Exam', 'III', 2, 'East', '2019', '252', 'English', 89, 'A-', 0),
(739, 'Opener Exam', 'I', 3, 'J', '2020', '4354', 'English', 34, 'D-', 0),
(740, 'Opener Exam', 'I', 3, 'S', '2020', '4352', 'English', 66, 'B', 0),
(741, 'Opener Exam', 'I', 3, 'J', '2020', '4276', 'English', 77, 'A-', 0),
(742, 'Opener Exam', 'I', 3, 'M', '2020', '4325', 'English', 88, 'A', 0),
(743, 'Opener Exam', 'I', 3, 'M', '2020', '4308', 'English', 99, 'A', 0),
(744, 'Opener Exam', 'I', 3, 'R', '2020', '4365', 'English', 88, 'A', 0),
(745, 'Opener Exam', 'I', 3, 'S', '2020', '4406', 'English', 77, 'A-', 0),
(746, 'Opener Exam', 'I', 3, 'M', '2020', '4270', 'English', 66, 'B', 0),
(747, 'Opener Exam', 'I', 3, 'R', '2020', '4387', 'English', 55, 'C+', 0),
(748, 'Opener Exam', 'I', 3, 'M', '2020', '4385', 'English', 44, 'D+', 0),
(749, 'Opener Exam', 'I', 3, 'R', '2020', '4438', 'English', 67, 'B', 0),
(750, 'Opener Exam', 'I', 3, 'S', '2020', '4324', 'English', 78, 'A-', 0),
(751, 'Opener Exam', 'I', 3, 'J', '2020', '4354', 'Physic', 34, 'D-', 0),
(752, 'Opener Exam', 'I', 3, 'S', '2020', '4352', 'Physic', 78, 'A-', 0),
(753, 'Opener Exam', 'I', 3, 'J', '2020', '4276', 'Physic', 77, 'A-', 0),
(754, 'Opener Exam', 'I', 3, 'M', '2020', '4325', 'Physic', 65, 'B', 0),
(755, 'Opener Exam', 'I', 3, 'M', '2020', '4308', 'Physic', 90, 'A', 0),
(756, 'Opener Exam', 'I', 3, 'R', '2020', '4365', 'Physic', 98, 'A', 0),
(757, 'Opener Exam', 'I', 3, 'S', '2020', '4406', 'Physic', 76, 'A-', 0),
(758, 'Opener Exam', 'I', 3, 'M', '2020', '4270', 'Physic', 55, 'C+', 0),
(759, 'Opener Exam', 'I', 3, 'R', '2020', '4387', 'Physic', 45, 'C-', 0),
(760, 'Opener Exam', 'I', 3, 'M', '2020', '4385', 'Physic', 45, 'C-', 0),
(761, 'Opener Exam', 'I', 3, 'R', '2020', '4438', 'Physic', 56, 'C+', 0),
(762, 'Opener Exam', 'I', 3, 'S', '2020', '4324', 'Physic', 67, 'B', 0),
(763, 'Mid Term', 'I', 3, 'J', '2020', '4354', 'Computer', 53, 'C', 0),
(764, 'Mid Term', 'I', 3, 'S', '2020', '4352', 'Computer', 29, 'E', 0),
(765, 'Mid Term', 'I', 3, 'J', '2020', '4276', 'Computer', 36, 'D', 0),
(766, 'Mid Term', 'I', 3, 'M', '2020', '4325', 'Computer', 64, 'B-', 0),
(767, 'Mid Term', 'I', 3, 'M', '2020', '4308', 'Computer', 24, 'E', 0),
(768, 'Mid Term', 'I', 3, 'R', '2020', '4365', 'Computer', 16, 'E', 0),
(769, 'Mid Term', 'I', 3, 'S', '2020', '4406', 'Computer', 56, 'C+', 0),
(770, 'Mid Term', 'I', 3, 'M', '2020', '4270', 'Computer', 4, 'E', 0),
(771, 'Mid Term', 'I', 3, 'R', '2020', '4387', 'Computer', 27, 'E', 0),
(772, 'Mid Term', 'I', 3, 'M', '2020', '4385', 'Computer', 27, 'E', 0),
(773, 'Mid Term', 'I', 3, 'R', '2020', '4438', 'Computer', 31, 'D-', 0),
(774, 'Mid Term', 'I', 3, 'S', '2020', '4324', 'Computer', 24, 'E', 0);
-- --------------------------------------------------------
--
-- Table structure for table `examtotals`
--
CREATE TABLE IF NOT EXISTS `examtotals` (
`id` int(11) NOT NULL,
`studentReg` varchar(6) NOT NULL,
`exam` varchar(20) NOT NULL,
`total` int(11) NOT NULL,
`points` int(2) NOT NULL DEFAULT '0',
`MeanScore` int(11) NOT NULL DEFAULT '0',
`Grade` varchar(3) NOT NULL DEFAULT '--',
`Class` int(11) NOT NULL,
`Stream` varchar(16) NOT NULL,
`term` varchar(4) NOT NULL,
`year` varchar(4) NOT NULL,
`position` int(11) NOT NULL DEFAULT '0',
`StreamPosition` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `examtotals`
--
INSERT INTO `examtotals` (`id`, `studentReg`, `exam`, `total`, `points`, `MeanScore`, `Grade`, `Class`, `Stream`, `term`, `year`, `position`, `StreamPosition`) VALUES
(1, '4354', 'Opener Exam', 68, 4, 2, 'D-', 3, 'J', 'I', '2020', 12, 0),
(2, '4352', 'Opener Exam', 144, 20, 10, 'B+', 3, 'S', 'I', '2020', 7, 0),
(3, '4276', 'Opener Exam', 154, 22, 11, 'A-', 3, 'J', 'I', '2020', 4, 0),
(4, '4325', 'Opener Exam', 153, 21, 11, 'A-', 3, 'M', 'I', '2020', 5, 0),
(5, '4308', 'Opener Exam', 189, 24, 12, 'A', 3, 'M', 'I', '2020', 1, 0),
(6, '4365', 'Opener Exam', 186, 24, 12, 'A', 3, 'R', 'I', '2020', 2, 0),
(7, '4406', 'Opener Exam', 153, 22, 11, 'A-', 3, 'S', 'I', '2020', 3, 0),
(8, '4270', 'Opener Exam', 121, 16, 8, 'B-', 3, 'M', 'I', '2020', 8, 0),
(9, '4387', 'Opener Exam', 100, 12, 6, 'C', 3, 'R', 'I', '2020', 10, 0),
(10, '4385', 'Opener Exam', 89, 9, 5, 'C-', 3, 'M', 'I', '2020', 11, 0),
(11, '4438', 'Opener Exam', 123, 16, 8, 'B-', 3, 'R', 'I', '2020', 9, 0),
(12, '4324', 'Opener Exam', 145, 20, 10, 'B+', 3, 'S', 'I', '2020', 6, 0),
(13, '4354', 'Mid Term', 53, 6, 6, 'C', 3, 'J', 'I', '2020', 3, 0),
(14, '4352', 'Mid Term', 29, 1, 1, 'E', 3, 'S', 'I', '2020', 8, 0),
(15, '4276', 'Mid Term', 36, 3, 3, 'D', 3, 'J', 'I', '2020', 4, 0),
(16, '4325', 'Mid Term', 64, 8, 8, 'B-', 3, 'M', 'I', '2020', 1, 0),
(17, '4308', 'Mid Term', 24, 1, 1, 'E', 3, 'M', 'I', '2020', 6, 0),
(18, '4365', 'Mid Term', 16, 1, 1, 'E', 3, 'R', 'I', '2020', 7, 0),
(19, '4406', 'Mid Term', 56, 7, 7, 'C+', 3, 'S', 'I', '2020', 2, 0),
(20, '4270', 'Mid Term', 4, 1, 1, 'E', 3, 'M', 'I', '2020', 9, 0),
(21, '4387', 'Mid Term', 27, 1, 1, 'E', 3, 'R', 'I', '2020', 10, 0),
(22, '4385', 'Mid Term', 27, 1, 1, 'E', 3, 'M', 'I', '2020', 11, 0),
(23, '4438', 'Mid Term', 31, 2, 2, 'D-', 3, 'R', 'I', '2020', 5, 0),
(24, '4324', 'Mid Term', 24, 1, 1, 'E', 3, 'S', 'I', '2020', 12, 0);
-- --------------------------------------------------------
--
-- Table structure for table `fees`
--
CREATE TABLE IF NOT EXISTS `fees` (
`id` int(11) NOT NULL,
`votehead` varchar(20) NOT NULL,
`term` varchar(4) NOT NULL,
`class` int(11) NOT NULL,
`amount` int(11) NOT NULL,
`year` varchar(4) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `fees`
--
INSERT INTO `fees` (`id`, `votehead`, `term`, `class`, `amount`, `year`) VALUES
(1, 'Lunch Programme', 'I', 1, 5000, '2020'),
(2, 'Development', 'I', 1, 5000, '2020'),
(3, 'Lunch Programme', 'I', 4, 1500, '2020'),
(4, 'Games', 'I', 4, 500, '2020'),
(5, 'PTA', 'I', 4, 2000, '2020'),
(6, 'Development', 'I', 4, 3500, '2020'),
(7, 'Tution', 'I', 4, 5000, '2020');
-- --------------------------------------------------------
--
-- Table structure for table `grades`
--
CREATE TABLE IF NOT EXISTS `grades` (
`id` int(11) NOT NULL,
`subCat` varchar(20) NOT NULL,
`Min` int(11) NOT NULL,
`Max` int(11) NOT NULL,
`Notation` varchar(2) NOT NULL,
`status` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `grades`
--
INSERT INTO `grades` (`id`, `subCat`, `Min`, `Max`, `Notation`, `status`) VALUES
(1, 'LANGUAGES', 1, 29, 'E', 1),
(2, 'LANGUAGES', 30, 34, 'D-', 1),
(3, 'LANGUAGES', 35, 39, 'D', 1),
(4, 'LANGUAGES', 40, 44, 'D+', 1),
(5, 'LANGUAGES', 45, 49, 'C-', 1),
(6, 'LANGUAGES', 50, 54, 'C', 1),
(7, 'LANGUAGES', 55, 59, 'C+', 1),
(8, 'LANGUAGES', 60, 64, 'B-', 1),
(9, 'LANGUAGES', 65, 69, 'B', 1),
(10, 'LANGUAGES', 70, 74, 'B+', 1),
(11, 'LANGUAGES', 75, 79, 'A-', 1),
(12, 'LANGUAGES', 80, 100, 'A', 1),
(13, 'MATHEMATICS', 1, 29, 'E', 1),
(14, 'MATHEMATICS', 30, 34, 'D-', 1),
(15, 'MATHEMATICS', 35, 39, 'D', 1),
(16, 'MATHEMATICS', 40, 44, 'D+', 1),
(17, 'MATHEMATICS', 45, 49, 'C-', 1),
(18, 'MATHEMATICS', 50, 54, 'C', 1),
(19, 'MATHEMATICS', 55, 59, 'C+', 1),
(20, 'MATHEMATICS', 60, 64, 'B-', 1),
(21, 'MATHEMATICS', 65, 69, 'B', 1),
(22, 'MATHEMATICS', 70, 74, 'B+', 1),
(23, 'MATHEMATICS', 75, 79, 'A-', 1),
(24, 'MATHEMATICS', 80, 100, 'A', 1),
(25, 'SCIENCES', 1, 29, 'E', 1),
(26, 'SCIENCES', 30, 34, 'D-', 1),
(27, 'SCIENCES', 35, 39, 'D', 1),
(28, 'SCIENCES', 40, 44, 'D+', 1),
(29, 'SCIENCES', 45, 49, 'C-', 1),
(30, 'SCIENCES', 50, 54, 'C', 1),
(31, 'SCIENCES', 55, 59, 'C+', 1),
(32, 'SCIENCES', 60, 64, 'B-', 1),
(33, 'SCIENCES', 65, 69, 'B', 1),
(34, 'SCIENCES', 70, 74, 'B+', 1),
(35, 'SCIENCES', 75, 79, 'A-', 1),
(36, 'SCIENCES', 80, 100, 'A', 1),
(37, 'HUMANITIES', 1, 29, 'E', 1),
(38, 'HUMANITIES', 30, 34, 'D-', 1),
(39, 'HUMANITIES', 35, 39, 'D', 1),
(40, 'HUMANITIES', 40, 44, 'D+', 1),
(41, 'HUMANITIES', 45, 49, 'C-', 1),
(42, 'HUMANITIES', 50, 54, 'C', 1),
(43, 'HUMANITIES', 55, 59, 'C+', 1),
(44, 'HUMANITIES', 60, 64, 'B-', 1),
(45, 'HUMANITIES', 65, 69, 'B', 1),
(46, 'HUMANITIES', 70, 74, 'B+', 1),
(47, 'HUMANITIES', 75, 79, 'A-', 1),
(48, 'HUMANITIES', 80, 100, 'A', 1),
(49, 'TECHNICALS', 1, 29, 'E', 1),
(50, 'TECHNICALS', 30, 34, 'D-', 1),
(51, 'TECHNICALS', 35, 39, 'D', 1),
(52, 'TECHNICALS', 40, 44, 'D+', 1),
(53, 'TECHNICALS', 45, 49, 'C-', 1),
(54, 'TECHNICALS', 50, 54, 'C', 1),
(55, 'TECHNICALS', 55, 59, 'C+', 1),
(56, 'TECHNICALS', 60, 64, 'B-', 1),
(57, 'TECHNICALS', 65, 69, 'B', 1),
(58, 'TECHNICALS', 70, 74, 'B+', 1),
(59, 'TECHNICALS', 75, 79, 'A-', 1),
(60, 'TECHNICALS', 80, 100, 'A', 1);
-- --------------------------------------------------------
--
-- Table structure for table `isavposted`
--
CREATE TABLE IF NOT EXISTS `isavposted` (
`id` int(11) NOT NULL,
`exam` varchar(50) NOT NULL,
`class` varchar(2) NOT NULL,
`year` varchar(4) NOT NULL,
`term` varchar(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `maintenance`
--
CREATE TABLE IF NOT EXISTS `maintenance` (
`id` int(11) NOT NULL,
`Descr` text NOT NULL,
`Amount` int(11) NOT NULL,
`Dater` varchar(15) NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`DateA` varchar(20) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `maintenance`
--
INSERT INTO `maintenance` (`id`, `Descr`, `Amount`, `Dater`, `status`, `DateA`) VALUES
(1, 'for food', 15000000, '2020-Feb-27', 0, '2020-Feb-27');
-- --------------------------------------------------------
--
-- Table structure for table `nextsession`
--
CREATE TABLE IF NOT EXISTS `nextsession` (
`id` int(11) NOT NULL,
`term` varchar(3) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `nextsession`
--
INSERT INTO `nextsession` (`id`, `term`) VALUES
(1, 'I');
-- --------------------------------------------------------
--
-- Table structure for table `nextterm`
--
CREATE TABLE IF NOT EXISTS `nextterm` (
`id` int(11) NOT NULL,
`Amout` int(11) NOT NULL,
`Class` int(11) NOT NULL,
`Term` varchar(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `nexttermfees`
--
CREATE TABLE IF NOT EXISTS `nexttermfees` (
`id` int(11) NOT NULL,
`votehead` varchar(30) NOT NULL,
`term` varchar(3) NOT NULL,
`class` int(11) NOT NULL,
`amount` int(11) NOT NULL,
`year` int(4) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `nexttermfees`
--
INSERT INTO `nexttermfees` (`id`, `votehead`, `term`, `class`, `amount`, `year`) VALUES
(6, 'Lunch Programme', 'I', 1, 8000, 2019),
(7, 'Lunch Programme', 'I', 2, 8000, 2019),
(8, 'Lunch Programme', 'I', 3, 8000, 2019),
(9, 'Lunch Programme', 'I', 4, 8000, 2019),
(10, 'Lunch Programme', 'II', 2, 90000, 2019),
(11, 'Lunch Programme', 'II', 1, 9000, 2019),
(12, 'Games', 'I', 3, 9000, 2019),
(13, 'Lunch Programme', 'I', 1, 5000, 2020),
(14, 'Development', 'I', 1, 5000, 2020),
(15, 'Lunch Programme', 'I', 4, 1500, 2020),
(16, 'Games', 'I', 4, 500, 2020),
(17, 'PTA', 'I', 4, 2000, 2020),
(18, 'Development', 'I', 4, 3500, 2020),
(19, 'Tution', 'I', 4, 5000, 2020);
-- --------------------------------------------------------
--
-- Table structure for table `payments`
--
CREATE TABLE IF NOT EXISTS `payments` (
`id` int(11) NOT NULL,
`studentReg` varchar(10) NOT NULL,
`term` varchar(4) NOT NULL,
`Amount` int(11) NOT NULL,
`class` int(11) NOT NULL,
`mode` varchar(20) NOT NULL,
`Date` varchar(15) NOT NULL,
`Year` int(11) NOT NULL,
`receiptNumber` varchar(20) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `payments`
--
INSERT INTO `payments` (`id`, `studentReg`, `term`, `Amount`, `class`, `mode`, `Date`, `Year`, `receiptNumber`) VALUES
(1, '499', 'I', 5000, 1, 'Cash', '2020-Jan-13', 2020, '1501'),
(2, '499', 'I', 1000, 1, 'Cash', '2020-Jan-13', 2020, '1502'),
(3, '4387', 'I', 12000, 3, 'Cheque', '2020-Feb-27', 2020, '1503');
-- --------------------------------------------------------
--
-- Table structure for table `prole`
--
CREATE TABLE IF NOT EXISTS `prole` (
`id` int(11) NOT NULL,
`prole` varchar(40) NOT NULL,
`status` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `prole`
--
INSERT INTO `prole` (`id`, `prole`, `status`) VALUES
(1, 'Chair PTA', 1),
(2, 'pta ', 1);
-- --------------------------------------------------------
--
-- Table structure for table `settings`
--
CREATE TABLE IF NOT EXISTS `settings` (
`id` int(11) NOT NULL,
`sName` varchar(100) NOT NULL,
`Image` varchar(100) NOT NULL DEFAULT '0',
`Phone` int(15) NOT NULL,
`pBox` int(11) NOT NULL,
`pCode` int(11) NOT NULL,
`pCity` varchar(25) NOT NULL,
`bName` varchar(30) NOT NULL DEFAULT '-',
`aNumber` varchar(20) NOT NULL DEFAULT '-',
`sReceipt` varchar(20) NOT NULL,
`dWatermark` int(11) NOT NULL DEFAULT '0',
`cDate` varchar(10) NOT NULL DEFAULT '2020-05-07'
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `settings`
--
INSERT INTO `settings` (`id`, `sName`, `Image`, `Phone`, `pBox`, `pCode`, `pCity`, `bName`, `aNumber`, `sReceipt`, `dWatermark`, `cDate`) VALUES
(1, 'Shamata Girls High School', 'logo.jpg', 723122809, 8, 20304, 'Kaheho', 'Equity ', '7778765650103', '1501', 1, '2020-01-06');
-- --------------------------------------------------------
--
-- Table structure for table `stream`
--
CREATE TABLE IF NOT EXISTS `stream` (
`id` int(11) NOT NULL,
`streamName` varchar(10) NOT NULL,
`status` varchar(10) NOT NULL DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `stream`
--
INSERT INTO `stream` (`id`, `streamName`, `status`) VALUES
(1, 'M', '1'),
(2, 'J', '1'),
(3, 'S', '1');
-- --------------------------------------------------------
--
-- Table structure for table `student`
--
CREATE TABLE IF NOT EXISTS `student` (
`id` int(11) NOT NULL,
`names` varchar(60) NOT NULL,
`parent` varchar(50) NOT NULL,
`class` varchar(15) NOT NULL,
`stream` varchar(10) NOT NULL,
`regNo` varchar(10) NOT NULL,
`KCPE` varchar(3) NOT NULL DEFAULT '--',
`Birthday` varchar(10) NOT NULL,
`Year` varchar(5) NOT NULL,
`gender` varchar(6) NOT NULL,
`dorm` varchar(15) NOT NULL,
`photo` varchar(15) NOT NULL,
`fees` int(11) NOT NULL,
`balance` int(11) NOT NULL,
`status` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `subject`
--
CREATE TABLE IF NOT EXISTS `subject` (
`id` int(11) NOT NULL,
`subjectName` varchar(40) NOT NULL,
`subjectCode` int(4) NOT NULL,
`subjectAbbr` varchar(10) NOT NULL,
`subCategory` varchar(20) NOT NULL,
`status` int(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `subject`
--
INSERT INTO `subject` (`id`, `subjectName`, `subjectCode`, `subjectAbbr`, `subCategory`, `status`) VALUES
(1, 'English', 101, 'ENG', 'LANGUAGES', 1),
(2, 'Kiswahili', 102, 'KIS', 'LANGUAGES', 1),
(3, 'Mathematics', 121, 'MAT', 'MATHEMATICS', 1),
(4, 'Biology', 231, 'BIO', 'SCIENCES', 1),
(5, 'Physic', 232, 'PHYC', 'SCIENCES', 1),
(6, 'Chemistry', 233, 'CHEM', 'SCIENCES', 1),
(7, 'History', 311, 'HIS', 'HUMANITIES', 1),
(9, 'CRE', 313, 'CRE', 'HUMANITIES', 1),
(10, 'Agriculture', 443, 'AGRIC', 'TECHNICALS', 1),
(11, 'Business Studies', 565, 'BST', 'TECHNICALS', 1),
(12, 'Computer', 651, 'Comp', 'Technicals', 1),
(13, 'geography', 411, 'geo', 'Humanities', 1);
-- --------------------------------------------------------
--
-- Table structure for table `subjectteachers`
--
CREATE TABLE IF NOT EXISTS `subjectteachers` (
`id` int(11) NOT NULL,
`teacherName` varchar(20) NOT NULL,
`Subject` varchar(20) NOT NULL,
`class` int(2) NOT NULL,
`stream` varchar(10) NOT NULL,
`status` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `subjectteachers`
--
INSERT INTO `subjectteachers` (`id`, `teacherName`, `Subject`, `class`, `stream`, `status`) VALUES
(4, 'Adipo Domnic', 'Physic', 4, 'N', 0),
(5, 'Adipo Domnic', 'Physic', 2, 'East', 1),
(6, 'Adipo Domnic', 'Physic', 2, 'West', 1),
(7, 'Kosgei Gilbert', 'Kiswahili', 1, 'West', 1),
(8, 'Kosgei Gilbert', 'Kiswahili', 2, 'East', 1),
(9, 'Kosgei Gilbert', 'Geography', 1, 'East', 1),
(10, 'Kosgei Gilbert', 'Geography', 1, 'West', 1),
(11, 'Okech Fredrick', 'Biology', 1, 'East', 1),
(12, 'Okech Fredrick', 'Biology', 3, 'N', 1),
(13, 'Okech Fredrick', 'Chemistry', 3, 'N', 1),
(14, 'Okech Fredrick', 'Chemistry', 1, 'West', 1),
(15, 'Awiti Sylvanus', 'Mathematics', 1, 'West', 1),
(16, 'Awiti Sylvanus', 'Chemistry', 2, 'West', 1),
(17, 'Awiti Sylvanus', 'Physic', 1, 'East', 1),
(18, 'Awiti Sylvanus', 'Physic', 1, 'West', 1),
(19, 'Otieno Alphonce', 'English', 3, 'N', 1),
(20, 'Otieno Alphonce', 'English', 2, 'West', 1),
(21, 'Agutu John', 'Mathematics', 1, 'East', 1),
(22, 'Agutu John', 'Mathematics', 2, 'East', 1),
(23, 'Agutu John', 'Mathematics', 3, 'N', 1),
(24, 'Aketch Erick', 'Mathematics', 2, 'West', 1),
(25, 'Aketch Erick', 'Business Studies', 1, 'East', 1),
(26, 'Aketch Erick', 'Business Studies', 1, 'West', 1),
(27, 'Aketch Erick', 'Business Studies', 2, 'East', 1),
(28, 'Aketch Erick', 'Business Studies', 3, 'N', 1),
(29, 'Lumumba Susan', 'History', 1, 'West', 1),
(30, 'Lumumba Susan', 'CRE', 1, 'East', 1),
(31, 'Lumumba Susan', 'CRE', 2, 'East', 1),
(32, 'Lumumba Susan', 'CRE', 2, 'West', 1),
(33, 'Lumumba Susan', 'CRE', 3, 'N', 1),
(34, 'Agenga Meshack', 'History', 1, 'East', 1),
(35, 'Agenga Meshack', 'History', 2, 'West', 1),
(36, 'Agenga Meshack', 'History', 2, 'West', 1),
(37, 'Meshack', 'Biology', 2, 'West', 1),
(38, 'Meshack', 'Chemistry', 1, 'East', 1),
(39, 'Meshack', 'Chemistry', 2, 'East', 1),
(40, 'Akinyi Quinter', 'CRE', 1, 'West', 1),
(41, 'Akinyi Quinter', 'Kiswahili', 3, 'N', 1),
(42, 'Akinyi Quinter', 'Kiswahili', 2, 'West', 1),
(43, 'Akinyi Quinter', 'Kiswahili', 1, 'East', 1),
(44, 'Kembe Charles', 'English', 1, 'East', 1),
(45, 'Kembe Charles', 'English', 1, 'West', 1),
(46, 'Kembe Charles', 'English', 2, 'East', 1),
(47, 'Adhola Stephen', 'Biology', 1, 'West', 1),
(48, 'Adhola Stephen', 'Biology', 2, 'East', 1),
(49, 'Adhola Stephen', 'Agriculture', 1, 'East', 1),
(50, 'Adhola Stephen', 'Agriculture', 2, 'West', 1),
(52, 'Aketch Erick', 'Business Studies', 4, 'N', 1);
-- --------------------------------------------------------
--
-- Table structure for table `teacher`
--
CREATE TABLE IF NOT EXISTS `teacher` (
`id` int(11) NOT NULL,
`names` varchar(75) NOT NULL,
`Initial` varchar(10) NOT NULL DEFAULT 'NN',
`email` varchar(50) NOT NULL,
`gender` varchar(6) NOT NULL,
`bdate` varchar(20) NOT NULL,
`empNumber` varchar(20) NOT NULL,
`designation` varchar(20) DEFAULT NULL,
`department` varchar(20) NOT NULL,
`major` varchar(20) NOT NULL,
`minor` varchar(20) NOT NULL,
`academicLevel` varchar(20) NOT NULL,
`salary` int(7) NOT NULL,
`health` varchar(3) NOT NULL,
`password` varchar(72) NOT NULL,
`empType` varchar(20) NOT NULL,
`nationality` varchar(20) NOT NULL,
`phone` int(11) NOT NULL,
`kraPin` varchar(20) NOT NULL,
`idNumber` int(8) NOT NULL,
`previousEmployer` varchar(20) NOT NULL,
`passportName` varchar(20) NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`empDate` varchar(20) NOT NULL,
`role` varchar(20) NOT NULL,
`roled` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `teacher`
--
INSERT INTO `teacher` (`id`, `names`, `Initial`, `email`, `gender`, `bdate`, `empNumber`, `designation`, `department`, `major`, `minor`, `academicLevel`, `salary`, `health`, `password`, `empType`, `nationality`, `phone`, `kraPin`, `idNumber`, `previousEmployer`, `passportName`, `status`, `empDate`, `role`, `roled`) VALUES
(1, 'default Parent', 'NN', 'noemail@email.com', 'Male', '', '', NULL, '', '', '', 'Bachelors', 0, 'No', '', '', 'Kenyan', 33, '', 0, '', '', 0, '20-Jan-09', 'Parent', 0),
(2, 'sample parent ', 'NN', 'sample@email.com', 'Male', '', '', NULL, '', '', '', 'Bachelors', 0, 'No', '', '', 'Kenyan', 704922942, '', 0, '', '', 0, '20-Jan-13', 'Parent', 0),
(3, 'jane mburu', 'jm', 'mburujmburu7@gmail.com', 'Female', '', '098765', 'hod technicals', 'Technicals', 'History', 'Computer', 'masters', 300000, 'No', '603011e54ca13fc16988f28465b5ee885f188f27', 'Contractual', 'kenyan', 75683946, '3563f45', 246899, 'margaret kuria wanji', 'default.png', 0, '20-Feb-27', 'teacher', 0),
(4, 'magaret wanjiru', 'NN', 'mwk@gmai.com', 'Female', '', '', 'Chair PTA', '', '', '', 'degree', 0, 'No', '', '', 'kenyan', 864466, '', 0, '', '', 1, '20-Feb-27', 'Parent', 1);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL,
`username` varchar(20) NOT NULL,
`password` varchar(1000) NOT NULL,
`role` varchar(15) NOT NULL,
`status` int(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `username`, `password`, `role`, `status`) VALUES
(3, 'admin', 'dd94709528bb1c83d08f3088d4043f4742891f4f', 'Administrator', 1),
(4, 'Erick Aketch', '0c57c5489f26820c675cc96a6e265248c06317af', 'teacher', 0),
(5, 'Kelvine Mugoa', 'c3029b14e7d93183c03c8cd7f24ef0b210f3cb68', 'teacher', 0),
(6, 'Erick Aketch', '0c57c5489f26820c675cc96a6e265248c06317af', 'teacher', 0),
(7, 'Erick Aketch', '0c57c5489f26820c675cc96a6e265248c06317af', 'teacher', 1),
(8, 'Erick Aketch', '0c57c5489f26820c675cc96a6e265248c06317af', 'teacher', 1),
(9, 'Erick Aketch', '0c57c5489f26820c675cc96a6e265248c06317af', 'teacher', 0),
(10, 'Erick Aketch', '0c57c5489f26820c675cc96a6e265248c06317af', 'teacher', 0),
(11, 'Adipo Domnic', 'f8a0aa81088d61e01f634416fd00f5d776ec02a4', 'teacher', 1),
(12, 'Agenga Meshack', '184ec1979485b7b957ef983380b5101e931382c8', 'teacher', 0),
(13, 'Okech Fredrick', '9527e5d8b849725dca457c22419afe550f07b513', 'teacher', 1),
(14, 'Otieno Alphonce', '9a929adfe344d6684f790a0af224c5cedcce835b', 'teacher', 0),
(15, 'Aketch Erick', '88e29eb58697bdc50103db5f74aa7d6804ed2906', 'teacher', 0),
(16, 'Akinyi Quinter', '8610da47cd85177fae51d64db75a4ce7768bb324', 'teacher', 0),
(17, 'Kembe Charles', '91da7f9acf67c3921a4f48cc1a549ec52b9629c1', 'teacher', 0),
(18, 'Adhola Stephen', '602737f5ebd61ec04d4f2e965a37bba3e574d8d5', 'teacher', 0),
(19, 'Kosgei Gilbert', 'a7247817adee717711b7d49ab29696e273fc897b', 'teacher', 0),
(20, 'Agutu John', 'ce1caf520f341a2dbf324de384aca402eb8069ff', 'teacher', 0),
(21, 'Lumumba Susan', 'ecd851eddf750d2b4cadc1766da74c63fa410cf7', 'teacher', 0),
(22, 'Meshack', '085c46160fa2c3db5b9455a18bfc7f175ef538ae', 'teacher', 0),
(23, 'Awiti Sylvanus', '00b9c33af6cd852e68ce827a37138d7f8b69389e', 'teacher', 0),
(24, 'Alseba Ndwara', 'e56809e62a35c8e57c2c4b408b1c82bfce123e54', 'Accountant', 0),
(25, 'john doe', '6f4d061ff1d462a96eb1936a7d92a25e7d79ec02', 'teacher', 0),
(26, 'john doe', '69fb0da5a951d4545116f922cdb338bfa17fd116', 'teacher', 0),
(27, 'john doe', '343e3aaea9ff882f4d9fbc2b8b93ced8fbb24f36', 'Accountant', 0),
(28, 'john doe', '76d5f997ccf19207c56579ee4ecc0d6f82d99b4a', 'Librarian', 0),
(29, 'james maina ', '749f3c1d16287bc1b394577b5d42eccc928e1047', 'teacher', 0),
(30, 'jane mburu', 'bceb56a9b6cd9c5f623a7f601d7b3741344401b8', 'teacher', 1);
-- --------------------------------------------------------
--
-- Table structure for table `votehead`
--
CREATE TABLE IF NOT EXISTS `votehead` (
`id` int(11) NOT NULL,
`voteHead` varchar(20) NOT NULL,
`status` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `votehead`
--
INSERT INTO `votehead` (`id`, `voteHead`, `status`) VALUES
(2, 'Lunch Programme', 1),
(3, 'Games ', 1),
(4, 'PTA', 1),
(5, 'Development', 1),
(6, 'Tution', 1);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `averageresults`
--
ALTER TABLE `averageresults`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `averagetotals`
--
ALTER TABLE `averagetotals`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `catresults`
--
ALTER TABLE `catresults`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `cats`
--
ALTER TABLE `cats`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `catsubject`
--
ALTER TABLE `catsubject`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `cattotals`
--
ALTER TABLE `cattotals`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `classes`
--
ALTER TABLE `classes`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `form` (`form`);
--
-- Indexes for table `classmeans`
--
ALTER TABLE `classmeans`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `club`
--
ALTER TABLE `club`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `clubName` (`clubName`);
--
-- Indexes for table `clubsmembers`
--
ALTER TABLE `clubsmembers`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `currentsession`
--
ALTER TABLE `currentsession`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `department`
--
ALTER TABLE `department`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `department` (`department`);
--
-- Indexes for table `designation`
--
ALTER TABLE `designation`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `designation` (`designation`);
--
-- Indexes for table `dorm`
--
ALTER TABLE `dorm`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `dormName` (`dormName`);
--
-- Indexes for table `eresults`
--
ALTER TABLE `eresults`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `examinations`
--
ALTER TABLE `examinations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `examresults`
--
ALTER TABLE `examresults`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `examtotals`
--
ALTER TABLE `examtotals`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `fees`
--
ALTER TABLE `fees`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `grades`
--
ALTER TABLE `grades`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `isavposted`
--
ALTER TABLE `isavposted`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `maintenance`
--
ALTER TABLE `maintenance`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `nextsession`
--
ALTER TABLE `nextsession`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `nextterm`
--
ALTER TABLE `nextterm`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `nexttermfees`
--
ALTER TABLE `nexttermfees`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `payments`
--
ALTER TABLE `payments`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `prole`
--
ALTER TABLE `prole`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `prole` (`prole`);
--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `stream`
--
ALTER TABLE `stream`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `student`
--
ALTER TABLE `student`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `subject`
--
ALTER TABLE `subject`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `subjectName` (`subjectName`),
ADD KEY `subjectCode` (`subjectCode`);
--
-- Indexes for table `subjectteachers`
--
ALTER TABLE `subjectteachers`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `teacher`
--
ALTER TABLE `teacher`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `names` (`names`,`empNumber`),
ADD KEY `email` (`email`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD KEY `username` (`username`);
--
-- Indexes for table `votehead`
--
ALTER TABLE `votehead`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `averageresults`
--
ALTER TABLE `averageresults`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `averagetotals`
--
ALTER TABLE `averagetotals`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `catresults`
--
ALTER TABLE `catresults`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `cats`
--
ALTER TABLE `cats`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `catsubject`
--
ALTER TABLE `catsubject`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `cattotals`
--
ALTER TABLE `cattotals`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `classes`
--
ALTER TABLE `classes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `classmeans`
--
ALTER TABLE `classmeans`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `club`
--
ALTER TABLE `club`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `clubsmembers`
--
ALTER TABLE `clubsmembers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `currentsession`
--
ALTER TABLE `currentsession`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `department`
--
ALTER TABLE `department`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `designation`
--
ALTER TABLE `designation`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `dorm`
--
ALTER TABLE `dorm`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `eresults`
--
ALTER TABLE `eresults`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `examinations`
--
ALTER TABLE `examinations`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `examresults`
--
ALTER TABLE `examresults`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=775;
--
-- AUTO_INCREMENT for table `examtotals`
--
ALTER TABLE `examtotals`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=25;
--
-- AUTO_INCREMENT for table `fees`
--
ALTER TABLE `fees`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `grades`
--
ALTER TABLE `grades`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=61;
--
-- AUTO_INCREMENT for table `isavposted`
--
ALTER TABLE `isavposted`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `maintenance`
--
ALTER TABLE `maintenance`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `nextsession`
--
ALTER TABLE `nextsession`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `nextterm`
--
ALTER TABLE `nextterm`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `nexttermfees`
--
ALTER TABLE `nexttermfees`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=20;
--
-- AUTO_INCREMENT for table `payments`
--
ALTER TABLE `payments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `prole`
--
ALTER TABLE `prole`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `stream`
--
ALTER TABLE `stream`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `student`
--
ALTER TABLE `student`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `subject`
--
ALTER TABLE `subject`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=14;
--
-- AUTO_INCREMENT for table `subjectteachers`
--
ALTER TABLE `subjectteachers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=53;
--
-- AUTO_INCREMENT for table `teacher`
--
ALTER TABLE `teacher`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=31;
--
-- AUTO_INCREMENT for table `votehead`
--
ALTER TABLE `votehead`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
/*!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 */;
|
/*
Navicat MySQL Data Transfer
Source Server : Training
Source Server Version : 50519
Source Host : localhost:3306
Source Database : trading
Target Server Type : MYSQL
Target Server Version : 50519
File Encoding : 65001
Date: 2017-08-08 10:23:50
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `fill_t`
-- ----------------------------
DROP TABLE IF EXISTS `fill_t`;
CREATE TABLE `fill_t` (
`price` double(20,0) NOT NULL,
`quantity` int(11) DEFAULT NULL,
`executions_id` bigint(20) NOT NULL,
PRIMARY KEY (`executions_id`),
CONSTRAINT `executions_id` FOREIGN KEY (`executions_id`) REFERENCES `orderexecution_t` (`executions_id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of fill_t
-- ----------------------------
|
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Мар 20 2019 г., 20:57
-- Версия сервера: 10.1.37-MariaDB
-- Версия PHP: 7.3.0
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 */;
--
-- База данных: `test2db`
--
-- --------------------------------------------------------
--
-- Структура таблицы `links`
--
CREATE TABLE `links` (
`id` int(11) NOT NULL,
`url` varchar(255) COLLATE utf8_general_mysql500_ci DEFAULT NULL,
`code` varchar(12) COLLATE utf8_general_mysql500_ci DEFAULT NULL,
`created` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_mysql500_ci;
--
-- Дамп данных таблицы `links`
--
INSERT INTO `links` (`id`, `url`, `code`, `created`) VALUES
(1, 'https://www.youtube.com', 'ytub0', '2019-03-20 16:05:14'),
(10, 'https://github.com/AlexeyAS', '7q2/gh', '2019-03-20 21:44:31'),
(11, 'https://www.google.com/search?source=hp&ei=6o6SXOX3GYiprgSB8beIDA&q=google&oq=goo&gs_l=psy-ab.1.0.35i39l2j0i67l6j0j0i3.1467.1856..3280...0.0..0.70.231.4......0....1..gws-wiz.....0..0i131i67j0i131.M_SjnJjfoLQ', '7q6/goog', '2019-03-20 22:05:37'),
(12, 'https://www.w3schools.com/php/showphp.asp?filename=demo_form_validation_complete', '7q4/w3s', '2019-03-20 21:45:03'),
(13, 'http://qaru.site/questions/230407/do-you-prefer-if-var-or-if-var-0', '7q5', '2019-03-20 22:03:24'),
(15, 'https://www.avito.ru/rossiya#login?next=%2Fadditem&s=direct', '7q7', '2019-03-20 22:07:58'),
(16, 'https://rutracker.org/forum/index.php', '7q8/rutrack', '2019-03-20 22:08:31'),
(17, 'https://webpack.js.org/guides/', '7q9/webpk', '2019-03-20 22:09:57'),
(18, 'https://spb.delivery-club.ru/prizes/', '7qa', '2019-03-20 22:10:17'),
(19, 'https://gitter.im/explore/tags/curated:frontend', '7qb/gitter', '2019-03-20 22:11:15'),
(20, 'https://capsulashop.ru/catalog/aksessuary/ryukzaki/ryukzak_dnmc_pack_chernyy/', '7qc/bag', '2019-03-20 22:12:18'),
(21, 'https://medium.com/@stepanovv.ru/%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9-css-oocss-smacss-bem-%D0%B8-sass-49351a119283', '21lsw/css', '2019-03-20 22:16:21'),
(22, 'https://habr.com/ru/post/235851/', '22jas', '2019-03-20 22:17:40'),
(23, 'https://ru.bem.info/', '23jyw/bem', '2019-03-20 22:18:12'),
(24, 'https://pages.github.com/', '24wqm/gpages', '2019-03-20 22:18:34'),
(25, 'http://jigsaw.w3.org/css-validator/', '25nta/valid', '2019-03-20 22:19:04');
--
-- Индексы сохранённых таблиц
--
--
-- Индексы таблицы `links`
--
ALTER TABLE `links`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT для сохранённых таблиц
--
--
-- AUTO_INCREMENT для таблицы `links`
--
ALTER TABLE `links`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;
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 */;
|
/*This file is not necessary to run the app. This stored procedure script
is applied to the database. I have included it for educational purposes.*/
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_validateLogin`(
IN p_email VARCHAR(20)
)
BEGIN
select * from tbl_user where user_email = p_email;
END $$
DELIMITER ;
|
-- TITLE1:
-- TITLE2: Displaying the Condition for Each Rule in a Rule Set
-- DESC:
SET LONGCHUNKSIZE 4000
SET LONG 4000
COLUMN RULE_OWNER HEADING 'Rule Owner' FORMAT A15
COLUMN RULE_NAME HEADING 'Rule Name' FORMAT A15
COLUMN RULE_CONDITION HEADING 'Rule Condition' FORMAT A45
SELECT R.RULE_OWNER,
R.RULE_NAME,
R.RULE_CONDITION
FROM DBA_RULES R, DBA_RULE_SET_RULES RS
WHERE
RS.RULE_NAME = R.RULE_NAME AND
RS.RULE_OWNER = R.RULE_OWNER
ORDER BY RS.RULE_SET_OWNER , RS.RULE_SET_NAME ;
|
preg_repalce => preg_repalce_callback
"。◕‿◕。感谢您的到来,房屋入住得干净整洁哟!为您的高素质点赞[[EMOJI:%F0%9F%92%90]][[EMOJI:%F0%9F%92%90]][[EMOJI:%F0%9F%8C%B9]][[EMOJI:%F0%9F%8C%B9]],下次需要入住单间我们还有高楼层景观房哦!期待您再次入住ヾ(❀╹◡╹)ノ~同时也推荐给各位房东。"
declare warning=>子父类继承方法参数不一致,不包括__construct warning LodgeUnit::create()
echo count(explode(',', $son)) . "\n";94
echo count(explode(',', $father)) . "\n";90
echo count(explode(',', $audit)) . "\n";91
echo count(explode(',', $respon)) . "\n";95
mktime() and gmmktime() 函数不再接受 is_dst 参数=>现有代码不见有使用is_dst的地方
shmop_ope =>未见有使用
getrusage() 现在支持 Windows =>未见有使用
dirname() 增加了可选的第二个参数, depth, 获取当前目录向上 depth 级父目录的名称 =>新增方法,不必理会
error_reporting(E_ALL^E_NOTICE^E_STRICT^E_DEPRECATED);
error_reporting(E_ALL^E_STRICT^E_DEPRECATED);
error_reporting(E_ALL^E_STRICT^E_DEPRECATED^E_WARNING);
reset() =>方法内必须为变量 notice
方法内部的参数,重复会报notice
Trying to get property of non-object =>notice都会报错
xml_set_object =>手动清除$pares |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 24. Mai 2018 um 21:46
-- Server-Version: 10.1.26-MariaDB
-- PHP-Version: 7.1.9
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 */;
--
-- Datenbank: `nota`
--
CREATE DATABASE IF NOT EXISTS `nota` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `nota`;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `friend`
--
CREATE TABLE `friend` (
`friendId` int(11) NOT NULL,
`userId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `note`
--
CREATE TABLE `note` (
`noteId` int(11) NOT NULL,
`userId` int(11) NOT NULL,
`friendId` int(11) DEFAULT NULL,
`noteTitel` varchar(50) NOT NULL,
`noteContent` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `task`
--
CREATE TABLE `task` (
`taskId` int(11) NOT NULL,
`userId` int(11) DEFAULT NULL,
`friendId` int(11) DEFAULT NULL,
`taskContent` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `user`
--
CREATE TABLE `user` (
`userId` int(11) NOT NULL,
`username` varchar(25) NOT NULL,
`password` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `user_friend`
--
CREATE TABLE `user_friend` (
`userId` int(11) NOT NULL,
`friendId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indizes der exportierten Tabellen
--
--
-- Indizes für die Tabelle `friend`
--
ALTER TABLE `friend`
ADD PRIMARY KEY (`friendId`),
ADD KEY `fk-userId-friend` (`userId`);
--
-- Indizes für die Tabelle `note`
--
ALTER TABLE `note`
ADD PRIMARY KEY (`noteId`),
ADD KEY `fk-userId-note` (`userId`) USING BTREE,
ADD KEY `fk-friendId-note` (`friendId`);
--
-- Indizes für die Tabelle `task`
--
ALTER TABLE `task`
ADD PRIMARY KEY (`taskId`),
ADD KEY `fk-userId-task` (`userId`) USING BTREE;
--
-- Indizes für die Tabelle `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`userId`),
ADD UNIQUE KEY `username` (`username`);
--
-- Indizes für die Tabelle `user_friend`
--
ALTER TABLE `user_friend`
ADD UNIQUE KEY `unique-userId-friendId` (`userId`,`friendId`),
ADD KEY `fk-friendId-friend` (`friendId`);
--
-- AUTO_INCREMENT für exportierte Tabellen
--
--
-- AUTO_INCREMENT für Tabelle `friend`
--
ALTER TABLE `friend`
MODIFY `friendId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50;
--
-- AUTO_INCREMENT für Tabelle `note`
--
ALTER TABLE `note`
MODIFY `noteId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
--
-- AUTO_INCREMENT für Tabelle `task`
--
ALTER TABLE `task`
MODIFY `taskId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT für Tabelle `user`
--
ALTER TABLE `user`
MODIFY `userId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=81;
--
-- Constraints der exportierten Tabellen
--
--
-- Constraints der Tabelle `friend`
--
ALTER TABLE `friend`
ADD CONSTRAINT `fk-userId-friend` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);
--
-- Constraints der Tabelle `note`
--
ALTER TABLE `note`
ADD CONSTRAINT `fk-friendId-note` FOREIGN KEY (`friendId`) REFERENCES `friend` (`friendId`),
ADD CONSTRAINT `fk-userId-note` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);
--
-- Constraints der Tabelle `task`
--
ALTER TABLE `task`
ADD CONSTRAINT `fk-userId-task` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);
--
-- Constraints der Tabelle `user_friend`
--
ALTER TABLE `user_friend`
ADD CONSTRAINT `fk-friendId-friend` FOREIGN KEY (`friendId`) REFERENCES `friend` (`friendId`),
ADD CONSTRAINT `fk-userId-user` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);
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 PROCEDURE spc_custcategory
AS
SELECT CategoryName, Active FROM CustomerCategory
|
CREATE TABLE `topic_callbacks` (
`id` bigint(22) NOT NULL,
`topic` varchar(45) NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id`) REFERENCES `callbacks` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.