sql stringlengths 6 1.05M |
|---|
<reponame>shankar01139/Bugatron<gh_stars>0
CREATE TABLE `project` (
`project_id` int NOT NULL AUTO_INCREMENT,
`project_name` varchar(45) NOT NULL,
`project_company` varchar(45) NOT NULL,
`created` datetime NOT NULL,
`customer_id` int NOT NULL,
PRIMARY KEY (`project_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
CREATE TABLE `issue` (
`issue_id` int NOT NULL AUTO_INCREMENT,
`issue_name` varchar(45) NOT NULL,
`issue_desc` longtext NOT NULL,
`project_id` int NOT NULL,
`issue_status` char(1) NOT NULL,
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
`assigned_to` int NOT NULL,
`action` longtext NOT NULL,
PRIMARY KEY (`issue_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;CREATE TABLE `developer` (
`developer_id` int NOT NULL AUTO_INCREMENT,
`developer_name` varchar(45) NOT NULL,
`developer_email` varchar(45) NOT NULL,
`developer_password` varchar(45) NOT NULL,
`developer_pos` varchar(45) NOT NULL,
`developer_contact` varchar(45) NOT NULL,
`created` datetime NOT NULL,
PRIMARY KEY (`developer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
CREATE TABLE `customer` (
`customer_id` int NOT NULL AUTO_INCREMENT,
`customer_name` varchar(45) NOT NULL,
`company_name` varchar(45) NOT NULL,
`customer_pass` varchar(45) NOT NULL,
`customer_contact` varchar(45) NOT NULL,
`created` datetime NOT NULL,
`customer_mail` varchar(45) NOT NULL,
`customer_stat` char(1) NOT NULL,
PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
CREATE TABLE `company` (
`company_id` int NOT NULL AUTO_INCREMENT,
`comapny_name` varchar(45) NOT NULL,
`company_stat` char(1) NOT NULL,
`created` datetime NOT NULL,
`company_address` varchar(100) NOT NULL,
`city` varchar(45) NOT NULL,
`state` varchar(45) NOT NULL,
`country` varchar(45) NOT NULL,
`zip` char(6) NOT NULL,
PRIMARY KEY (`company_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 30, 2019 at 06:25 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
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: `SpiceKitchen`
--
-- --------------------------------------------------------
--
-- Table structure for table `menus`
--
CREATE TABLE `menus` (
`menu_id` int(11) NOT NULL,
`menu_name` varchar(64) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `menus`
--
INSERT INTO `menus` (`menu_id`, `menu_name`, `created_at`, `updated_at`) VALUES
(1, 'test 1', '2019-01-30 02:45:36', '0000-00-00 00:00:00'),
(2, 'test 2', '2019-01-30 02:45:36', '0000-00-00 00:00:00');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `menus`
--
ALTER TABLE `menus`
ADD PRIMARY KEY (`menu_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `menus`
--
ALTER TABLE `menus`
MODIFY `menu_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
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 */;
|
<reponame>77paradox77/Java-Week5-RoomReview-
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: reviews; Type: TABLE; Schema: public; Owner: Guest; Tablespace:
--
CREATE TABLE reviews (
id integer NOT NULL,
description character varying,
date_created timestamp without time zone,
room_id integer,
user_id integer,
rating character varying
);
ALTER TABLE reviews OWNER TO "Guest";
--
-- Name: reviews_id_seq; Type: SEQUENCE; Schema: public; Owner: Guest
--
CREATE SEQUENCE reviews_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE reviews_id_seq OWNER TO "Guest";
--
-- Name: reviews_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: Guest
--
ALTER SEQUENCE reviews_id_seq OWNED BY reviews.id;
--
-- Name: rooms; Type: TABLE; Schema: public; Owner: Guest; Tablespace:
--
CREATE TABLE rooms (
id integer NOT NULL,
type character varying,
address character varying,
url character varying
);
ALTER TABLE rooms OWNER TO "Guest";
--
-- Name: rooms_id_seq; Type: SEQUENCE; Schema: public; Owner: Guest
--
CREATE SEQUENCE rooms_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE rooms_id_seq OWNER TO "Guest";
--
-- Name: rooms_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: Guest
--
ALTER SEQUENCE rooms_id_seq OWNED BY rooms.id;
--
-- Name: users; Type: TABLE; Schema: public; Owner: Guest; Tablespace:
--
CREATE TABLE users (
id integer NOT NULL,
name character varying,
password character varying
);
ALTER TABLE users OWNER TO "Guest";
--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: Guest
--
CREATE SEQUENCE users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE users_id_seq OWNER TO "Guest";
--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: Guest
--
ALTER SEQUENCE users_id_seq OWNED BY users.id;
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: Guest
--
ALTER TABLE ONLY reviews ALTER COLUMN id SET DEFAULT nextval('reviews_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: Guest
--
ALTER TABLE ONLY rooms ALTER COLUMN id SET DEFAULT nextval('rooms_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: Guest
--
ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
--
-- Data for Name: reviews; Type: TABLE DATA; Schema: public; Owner: Guest
--
COPY reviews (id, description, date_created, room_id, user_id, rating) FROM stdin;
4 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum do 2016-05-19 15:14:02.786 15 31 4.png
5 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laboru 2016-05-19 15:15:36.648 16 32 2.png
6 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laboru 2016-05-19 15:16:38.487 17 33 3.png
7 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 2016-05-19 15:18:05.967 18 34 3.png
8 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo volu 2016-05-19 15:19:33.121 19 35 2.png
9 "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipi 2016-05-19 15:20:52.399 20 36 \N
10 At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit 2016-05-19 15:22:09.91 21 37 5.png
11 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo 2016-05-19 15:48:05.375 22 38 1.png
12 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro qu 2016-05-19 15:48:56.415 23 39 5.png
13 At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiore 2016-05-19 15:50:04.736 24 40 2.png
14 At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumqueuibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiore 2016-05-19 15:51:37.847 25 41 2.png
15 Test 2016-05-20 09:15:53.153 26 45 1.png
\.
--
-- Name: reviews_id_seq; Type: SEQUENCE SET; Schema: public; Owner: Guest
--
SELECT pg_catalog.setval('reviews_id_seq', 15, true);
--
-- Data for Name: rooms; Type: TABLE DATA; Schema: public; Owner: Guest
--
COPY rooms (id, type, address, url) FROM stdin;
15 apartment 2101 NE 8th ave at Tillamook, Portland https://portland.craigslist.org/mlt/roo/5594685912.html
16 loft SE 41st at SE Morrison https://portland.craigslist.org/mlt/roo/5594642856.html
17 apartment SW 5th Ave at College Street, Portland
18 loft 434 SW College St http://all4desktop.com/data_images/original/4240860-bedroom.jpg
19 apartment Brazee ct at 138 th pl, Portland http://globe-views.com/dreams/bedroom.html
20 loft 164 th avenue, Porland https://upload.wikimedia.org/wikipedia/commons/c/cf/Hotel-suite-bedroom.jpg
21 apartment Stark and Sundial at Sundial, Porland http://tremendouswallpapers.com/wp-content/uploads/2014/12/deluxe-bedroom-1920x1080.jpg
22 apartment NE 154th at Ward Road http://photos2.zillowstatic.com/i_f/ISlio5u5uktg270000000000.jpg
23 apartment 107 N Cook St, Portland http://livinator.com/wp-content/uploads/2015/11/hgtv21.jpg
24 apartment SE foster rd at Harold St, Portland http://www.simplycleanhome.com/wp-content/uploads/2014/06/blog-post-10-image.jpg
25 apartment 8604 SW Scoffins, Portland http://cdn.home-designing.com/wp-content/uploads/2014/09/artist-bedroom-attic.jpeg
26 apartment 2101 NE 8th ave at Tillamook, Portland
\.
--
-- Name: rooms_id_seq; Type: SEQUENCE SET; Schema: public; Owner: Guest
--
SELECT pg_catalog.setval('rooms_id_seq', 26, true);
--
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: Guest
--
COPY users (id, name, password) FROM stdin;
30 Fernanda 234567
31 Fernanda 234567
32 Fernanda Lowe
33 Fernanda Lowe
34 Fernanda 234567
35 <EMAIL> Lowe
36 Fernanda 234567
37 Fernanda 234567
38 Fernanda Lowe
39 Fernanda 234567
40 Fernanda Lowe
41 <EMAIL> Lowe
42 Fernanda Lowe
43 Fernanda Lowe
44 Fernanda Fernanda
45 Fernanda acsfqwfcds
\.
--
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: Guest
--
SELECT pg_catalog.setval('users_id_seq', 45, true);
--
-- Name: reviews_pkey; Type: CONSTRAINT; Schema: public; Owner: Guest; Tablespace:
--
ALTER TABLE ONLY reviews
ADD CONSTRAINT reviews_pkey PRIMARY KEY (id);
--
-- Name: rooms_pkey; Type: CONSTRAINT; Schema: public; Owner: Guest; Tablespace:
--
ALTER TABLE ONLY rooms
ADD CONSTRAINT rooms_pkey PRIMARY KEY (id);
--
-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: Guest; Tablespace:
--
ALTER TABLE ONLY users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
--
-- Name: public; Type: ACL; Schema: -; Owner: epicodus
--
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM epicodus;
GRANT ALL ON SCHEMA public TO epicodus;
GRANT ALL ON SCHEMA public TO PUBLIC;
--
-- PostgreSQL database dump complete
--
|
<gh_stars>1-10
DELIMITER //
DROP PROCEDURE IF EXISTS create_view_posts;
CREATE PROCEDURE create_view_posts()
BEGIN
DROP TABLE IF EXISTS posts;
CREATE TABLE posts AS
SELECT
fd.course AS 'disciplina_id',
p2.created AS 'data',
f.name AS 'nome_forum',
p2.id AS 'post',
p2.parent,
p2.userid AS 'emissor',
p1.userid AS 'receptor'
FROM mdl_forum_posts p1
INNER JOIN mdl_forum_posts p2 ON p1.id=p2.parent
INNER JOIN mdl_forum_discussions fd ON p1.discussion=fd.id
INNER JOIN mdl_forum f ON fd.forum=f.id
ORDER BY fd.course, p2.userid;
ALTER TABLE posts ADD INDEX(disciplina_id);
END //
DELIMITER ;
|
-- 가장 최근에 동물이 들어온 날짜를 좋아하는 SQL 문
SELECT DATETIME FROM ANIMAL_INS ORDER BY DATETIME DESC LIMIT 1;
-- 다른 풀이
SELECT MAX(DATETIME) FROM ANIMAL_INS;
|
<reponame>Shuttl-Tech/antlr_psql
-- file:prepared_xacts.sql ln:71 expect:true
PREPARE TRANSACTION 'foo4'
|
ALTER TABLE teapots
DROP COLUMN description; |
<filename>tools/sql/curation_tag_report.sql<gh_stars>0
#This statement produces a tab-delimited table: | Pathway ID | Latest revision | Tags on specific revisions | All tags |
#You can import this table into Excel and use filters, sorting and functions to identify targets for curation or inconsistencies.
mysql -u wikipathwaysuser -p -D wikipathways -e 'select page_title, page_latest, group_concat(concat(tag_name, ":", tag.revision) order by tag_name separator ", ") as rev_tags, group_concat(tag_name order by tag_name separator ", ") as all_tags from tag left join page using(page_id) where tag_name like "Curation%" group by page_title;' > tag_report.tab
|
<filename>dba/postgres/updates/timescaledb/NET-266/NET-266-billing.sql
CREATE OR REPLACE FUNCTION solarbill.billing_tier_details(userid BIGINT, ts_min TIMESTAMP, ts_max TIMESTAMP, effective_date date DEFAULT CURRENT_DATE)
RETURNS TABLE(
node_id BIGINT,
min BIGINT,
prop_in BIGINT,
tier_prop_in BIGINT,
cost_prop_in NUMERIC,
prop_in_cost NUMERIC,
datum_stored BIGINT,
tier_datum_stored BIGINT,
cost_datum_stored NUMERIC,
datum_stored_cost NUMERIC,
datum_out BIGINT,
tier_datum_out BIGINT,
cost_datum_out NUMERIC,
datum_out_cost NUMERIC,
total_cost NUMERIC
) LANGUAGE sql STABLE AS
$$
WITH tiers AS (
SELECT * FROM solarbill.billing_tiers(effective_date)
)
, nodes AS (
SELECT nlt.time_zone,
ts_min AT TIME ZONE nlt.time_zone AS sdate,
ts_max AT TIME ZONE nlt.time_zone AS edate,
array_agg(DISTINCT nlt.node_id) AS nodes
FROM solarnet.node_local_time nlt
INNER JOIN solaruser.user_node un ON un.node_id = nlt.node_id
WHERE un.user_id = userid
GROUP BY nlt.time_zone
)
, stored AS (
SELECT
meta.node_id
, SUM(acc.datum_count + acc.datum_hourly_count + acc.datum_daily_count + acc.datum_monthly_count) AS datum_count
FROM nodes nodes
INNER JOIN solardatm.da_datm_meta meta ON meta.node_id = ANY(nodes.nodes)
INNER JOIN solardatm.aud_acc_datm_daily acc ON acc.stream_id = meta.stream_id
AND acc.ts_start >= nodes.sdate AND acc.ts_start < nodes.edate
GROUP BY meta.node_id
)
, datum AS (
SELECT
meta.node_id
, SUM(a.prop_count)::bigint AS prop_count
, SUM(a.datum_q_count)::bigint AS datum_q_count
FROM nodes nodes
INNER JOIN solardatm.da_datm_meta meta ON meta.node_id = ANY(nodes.nodes)
INNER JOIN solardatm.aud_datm_monthly a ON a.stream_id = meta.stream_id
AND a.ts_start >= nodes.sdate AND a.ts_start < nodes.edate
GROUP BY meta.node_id
)
, n AS (
SELECT UNNEST(nodes) AS node_id FROM nodes
)
, costs AS (
SELECT
n.node_id
, tiers.min
, COALESCE(a.prop_count, 0) AS prop_in
, LEAST(GREATEST(a.prop_count - tiers.min, 0), COALESCE(LEAD(tiers.min) OVER win - tiers.min, GREATEST(a.prop_count - tiers.min, 0))) AS tier_prop_in
, tiers.cost_prop_in
, s.datum_count AS datum_stored
, LEAST(GREATEST(s.datum_count - tiers.min, 0), COALESCE(LEAD(tiers.min) OVER win - tiers.min, GREATEST(s.datum_count - tiers.min, 0))) AS tier_datum_stored
, tiers.cost_datum_stored
, COALESCE(a.datum_q_count, 0) AS datum_out
, LEAST(GREATEST(a.datum_q_count - tiers.min, 0), COALESCE(LEAD(tiers.min) OVER win - tiers.min, GREATEST(a.datum_q_count - tiers.min, 0))) AS tier_datum_out
, tiers.cost_datum_out
FROM n
LEFT OUTER JOIN stored s ON s.node_id = n.node_id
LEFT OUTER JOIN datum a ON a.node_id = n.node_id
CROSS JOIN tiers
WINDOW win AS (PARTITION BY n.node_id ORDER BY tiers.min)
)
SELECT
node_id
, min
, prop_in
, tier_prop_in
, cost_prop_in
, (tier_prop_in * cost_prop_in) AS prop_in_cost
, datum_stored
, tier_datum_stored
, cost_datum_stored
, (tier_datum_stored * cost_datum_stored) AS datum_stored_cost
, datum_out
, tier_datum_out
, cost_datum_out
, (tier_datum_out * cost_datum_out) AS datum_out_cost
, ROUND((tier_prop_in * cost_prop_in) + (tier_datum_stored * cost_datum_stored) + (tier_datum_out * cost_datum_out), 2) AS total_cost
FROM costs
WHERE ROUND((tier_prop_in * cost_prop_in) + (tier_datum_stored * cost_datum_stored) + (tier_datum_out * cost_datum_out), 2) > 0
ORDER BY node_id
$$;
|
SELECT "foo""bar" FROM "t" |
<gh_stars>0
CREATE TABLE `gangs` (
`gangs_id` int(8) unsigned NOT NULL AUTO_INCREMENT,
`gangs_name` varchar(32) NOT NULL DEFAULT 'undefined',
`gangs_leader` int(8) NOT NULL DEFAULT '0',
`gangs_money` int(16) NOT NULL DEFAULT '0',
`gangs_materials` int(16) NOT NULL DEFAULT '0',
`gangs_car` int(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`faction_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
<gh_stars>0
-- @testpoint:opengauss关键字routine(非保留),作为用户名
--关键字routine作为用户名不带引号,创建成功
drop user if exists routine;
CREATE USER routine PASSWORD '<PASSWORD>';
--清理环境
drop user routine;
--关键字routine作为用户名加双引号,创建成功
drop user if exists "routine";
CREATE USER "routine" PASSWORD '<PASSWORD>';
--清理环境
drop user "routine";
--关键字routine作为用户名加单引号,合理报错
CREATE USER 'routine' PASSWORD '<PASSWORD>';
--关键字routine作为用户名加反引号,合理报错
CREATE USER `routine` PASSWORD '<PASSWORD>';
|
<reponame>amosvoron/edipi
/*
Object: dbo.GetDatabaseState
Description: Returns the current state of the database.
*/
CREATE FUNCTION [dbo].[GetDatabaseState]()
RETURNS int
AS
BEGIN
RETURN (
SELECT TOP(1) [DatabaseState]
FROM [dbo].[Config]
);
END;
GO
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : lun. 26 juil. 2021 à 19:19
-- Version du serveur : 5.7.31
-- Version de PHP : 7.3.21
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 données : `links_utility`
--
-- --------------------------------------------------------
--
-- Structure de la table `links`
--
DROP TABLE IF EXISTS `links`;
CREATE TABLE IF NOT EXISTS `links` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`original_link` varchar(255) NOT NULL,
`scheme` varchar(60) NOT NULL,
`host` varchar(60) NOT NULL,
`path` json NOT NULL,
`params` json NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
--
-- Déchargement des données de la table `links`
--
INSERT INTO `links` (`id`, `original_link`, `scheme`, `host`, `path`, `params`) VALUES
(24, 'http://www.geeksforgeeks.org/register?name=Amit&email=<EMAIL>', 'http', 'www.geeksforgeeks.org', '{\"1\": \"register\"}', '{\"name\": \"Amit\", \"email\": \"<EMAIL>\"}'),
(25, 'https://www.google.com/search?q=for+key+value+php&oq=for+key+va&aqs=edge.2.0j69i57j0i67j0l4.5146j0j1&sourceid=chrome&ie=UTF-8', 'https', 'www.google.com', '{\"1\": \"search\"}', '{\"q\": \"for key value php\", \"ie\": \"UTF-8\", \"oq\": \"for key va\", \"aqs\": \"edge.2.0j69i57j0i67j0l4.5146j0j1\", \"sourceid\": \"chrome\"}'),
(26, 'https://www.facebook.com/pages/?category=your_pages&ref=bookmarks', 'https', 'www.facebook.com', '{\"1\": \"pages\"}', '{\"ref\": \"bookmarks\", \"category\": \"your_pages\"}'),
(27, 'https://github.com/MiorantsoaRak/SyndicApp/settings/access', 'https', 'github.com', '{\"1\": \"MiorantsoaRak\", \"2\": \"SyndicApp\", \"3\": \"settings\", \"4\": \"access\"}', '[]');
-- --------------------------------------------------------
--
-- Structure de la table `user`
--
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(125) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
--
-- Déchargement des données de la table `user`
--
INSERT INTO `user` (`id`, `name`, `email`, `password`) VALUES
(2, '<NAME>', '<EMAIL>', <PASSWORD>Vv3C');
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 dbo.Menu_Del
(
@Id int
)
AS
SET NOCOUNT ON
IF(@Id > 0)
DELETE FROM Menu
WHERE Id=@Id
RETURN |
SELECT host FROM information_schema.processlist WHERE command='Binlog Dump'
select count(*) from `#{ table }`
select min(id) from `#{ origin_name }`
select count(*) from #{ table } where #{ column } = '#{ value }'
select max(id) from `#{ origin_name }`
|
CREATE TABLE [dbo].[UserLinkedInProfiles] (
[Id] BIGINT IDENTITY (1, 1) NOT NULL,
[LinkedInProfileId] BIGINT NOT NULL,
[AspNetUserId] NVARCHAR (128) NOT NULL,
[CreatedDate] DATETIME NOT NULL,
CONSTRAINT [PK_UserLinkedInProfiles] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_AspNetUserUserLinkedInProfile] FOREIGN KEY ([AspNetUserId]) REFERENCES [dbo].[AspNetUsers] ([Id]),
CONSTRAINT [FK_LinkedInProfileUserLinkedInProfile] FOREIGN KEY ([LinkedInProfileId]) REFERENCES [dbo].[LinkedInProfiles] ([Id])
);
GO
CREATE NONCLUSTERED INDEX [IX_FK_AspNetUserUserLinkedInProfile]
ON [dbo].[UserLinkedInProfiles]([AspNetUserId] ASC);
GO
CREATE NONCLUSTERED INDEX [IX_FK_LinkedInProfileUserLinkedInProfile]
ON [dbo].[UserLinkedInProfiles]([LinkedInProfileId] ASC);
|
<gh_stars>1-10
update eg_appconfig_values set value='YES' where key_id=(select id from eg_appconfig where key_name='BPA_CITIZENACCEPTANCE_CHECK'); |
<filename>awjf_wald_pub/awjf_wald_pub_wap_bst.sql
SELECT
ogc_fid AS t_id,
ST_Multi(wkb_geometry) AS geometrie,
id_wp,
fid_amtei,
fid_fk,
fid_fr,
wirt_zone,
gem_bfs,
hoheitsgrenzen_gemeindegrenze.gemeindename,
fid_we,
round(gb_flaeche,0) AS gb_flaeche,
we_text,
fid_eigcod,
CASE
WHEN fid_eig = 1000
THEN '1000 - Bundeswald'
WHEN fid_eig = 2000
THEN '2000 - Staatswald'
WHEN fid_eig = 3100
THEN '3100 - Bürgergemeinde'
WHEN fid_eig = 3200
THEN '3200 - Einwohnergemeinde'
WHEN fid_eig = 3300
THEN '3300 - Einheitsgemeinde'
WHEN fid_eig = 4000
THEN '4000 - Öffentlich (gemischt)'
WHEN fid_eig = 5000
THEN '5000 - Gemischt öffentlich privat'
WHEN fid_eig = 6000
THEN '6000 - Privat'
WHEN fid_eig = 7000
THEN '7000 - Privat (gemischt)'
END AS fid_eig,
fid_prod,
CASE
WHEN wpnr = 501
THEN '501 - Wirtschaftswald'
WHEN wpnr = 502
THEN '502 - Schutzwald'
WHEN wpnr = 503
THEN '503 - Erholungswald'
WHEN wpnr = 504
THEN '504 - Natur und Landschaft'
WHEN wpnr = 505
THEN '505 - Schutzwald / Natur und Landschaft'
WHEN wpnr = 509
THEN '509 - Nicht Wald'
END AS wpnr,
CASE
WHEN wptyp = 1
THEN '1 - Mit <NAME>'
WHEN wptyp = 2
THEN '2 - Niederhaltezone'
WHEN wptyp = 3
THEN '3 - Waldstrasse'
WHEN wptyp = 4
THEN '4 - Maschinenweg'
WHEN wptyp = 5
THEN '5 - Bauten und Anlagen'
WHEN wptyp = 6
THEN '6 - Rodungsfläche (temporär)'
WHEN wptyp = 7
THEN '7 - Gewässer'
WHEN wptyp = 8
THEN '8 - Abbaustelle'
WHEN wptyp = 9
THEN '9 - Nicht Wald'
END AS wptyp,
CASE
WHEN betriebsteil = 1
THEN concat_ws(' - ', betriebsteil, 'Talwald')
WHEN betriebsteil = 2
THEN concat_ws(' - ', betriebsteil, 'Bergwald')
WHEN betriebsteil = 3
THEN concat_ws(' - ', betriebsteil, 'Vorberg')
WHEN betriebsteil = 4
THEN concat_ws(' - ', betriebsteil, 'Sonnseite')
WHEN betriebsteil = 5
THEN concat_ws(' - ', betriebsteil, 'Schattseite')
WHEN betriebsteil = 6
THEN concat_ws(' - ', betriebsteil, 'Lebern-Klus')
WHEN betriebsteil = 7
THEN concat_ws(' - ', betriebsteil, 'Aebisholz')
WHEN betriebsteil = 8
THEN concat_ws(' - ', betriebsteil, 'Jurawald')
WHEN betriebsteil = 9
THEN concat_ws(' - ', betriebsteil, 'Bornwald')
END AS betriebsteil,
fid_abt,
bstnr,
bsttyp,
CASE
WHEN
bsttyp >= 10
AND
bsttyp <= 14
THEN 'Jungwuchs/Dickung (10-14)'
WHEN
bsttyp >= 21
AND
bsttyp <= 24
THEN 'Stangenholz (21-24)'
WHEN
bsttyp >= 31
AND
bsttyp <= 34
THEN 'Schwaches Baumholz (31-34)'
WHEN
bsttyp >= 41
AND
bsttyp <= 44
THEN 'Mittleres Baumholz (41-44)'
WHEN
bsttyp >= 51
AND
bsttyp <= 54
THEN 'Starkes Baumholz (51-54)'
WHEN
bsttyp >= 61
AND
bsttyp <= 64
THEN 'St. Baumholz aufgelockert (61-64)'
WHEN
bsttyp >= 70
AND
bsttyp <= 74
THEN 'Übriger Wald ausser Bewirtschaftung (70-74)'
WHEN bsttyp = 75
THEN 'Altholzinsel (75)'
WHEN bsttyp = 76
THEN 'Andere Förderfläche (76)'
WHEN bsttyp = 77
THEN 'Waldrand (77)'
WHEN bsttyp = 79
THEN 'Waldreservat mit Vereinbarung (79)'
WHEN
bsttyp >= 81
AND
bsttyp <= 84
THEN 'Dauerwald / Plenterwald (81-84)'
WHEN
bsttyp >= 210
AND
bsttyp <= 214
THEN 'Mittelwald (210-214)'
WHEN
bsttyp >= 200
AND
bsttyp <= 204
THEN 'Niederwald (200-204)'
END AS bsttyp_text,
wpinfo,
bemerkung,
round(flae_gis::numeric,0) AS flae_gis,
round(korr_flae::numeric,0) AS korr_flae,
round(wpflae::numeric,0) AS wpflae,
zeitstand,
beschrift,
x_beschr,
y_beschr,
objnummer
FROM
awjf.wap_bst
LEFT JOIN agi_hoheitsgrenzen_pub.hoheitsgrenzen_gemeindegrenze
ON hoheitsgrenzen_gemeindegrenze.bfs_gemeindenummer = wap_bst.gem_bfs
WHERE
archive = 0
;
|
<reponame>MikeBeaton/SqlDataComparisonUtils<gh_stars>1-10
USE SqlUtils
GO
EXEC tSQLt.NewTestClass 'testUseWhereJoinIds';
GO
CREATE PROCEDURE testUseWhereJoinIds.[test @use works]
AS
BEGIN
DECLARE @CRLF CHAR(2) = CHAR(13) + CHAR(10)
DECLARE @Message NVARCHAR(MAX) =
'Data differences found between OURS <<< [SqlUtilsTests_A].[dbo].[CountryTable] and THEIRS >>> [SqlUtilsTests_C].[dbo].[CountryList].' + @CRLF +
' - Switch to results window to view differences.' + @CRLF +
' - Call [Import|Export][Added|Deleted|Changed|All] (e.g. ImportAdded) with the same arguments to transfer changes.' + @CRLF
EXEC tSQLt.ExpectException @Message, 16, 1
EXEC CompareData 'SqlUtilsTests_A..CountryTable', 'SqlUtilsTests_C..CountryList', @use='countryid, country'
END
GO
CREATE PROCEDURE testUseWhereJoinIds.[test @use + @where works]
AS
BEGIN
DECLARE @CRLF CHAR(2) = CHAR(13) + CHAR(10)
EXEC tSQLt.CaptureOutput 'EXEC CompareData ''SqlUtilsTests_A..CountryTable'', ''SqlUtilsTests_C..CountryList'', @use=''countryid, country'', @where = ''[ours].valid = 1'''
SELECT CAST (
@CRLF +
'No data differences found between OURS <<< [SqlUtilsTests_A].[dbo].[CountryTable] and THEIRS >>> [SqlUtilsTests_C].[dbo].[CountryList].' + @CRLF
AS NVARCHAR(MAX)) AS OutputText
INTO #TestOutput
EXEC tSQLt.AssertEqualsTable '#TestOutput', 'SqlUtils.tSQLt.CaptureOutputLog'
END
GO
CREATE PROCEDURE testUseWhereJoinIds.[test @use + ImportDeleted works]
AS
BEGIN
DECLARE @CRLF CHAR(2) = CHAR(13) + CHAR(10)
EXEC tSQLt.CaptureOutput 'EXEC ImportDeleted ''SqlUtilsTests_A..CountryTable'', ''SqlUtilsTests_C..CountryList'', @use=''countryid, country'''
SELECT CAST (
'' + @CRLF +
'Importing deleted rows...' + @CRLF +
'Requested import completed with no errors. Deleted 3 rows from [ours].' + @CRLF +
'' + @CRLF +
'No data differences found between OURS <<< [SqlUtilsTests_A].[dbo].[CountryTable] and THEIRS >>> [SqlUtilsTests_C].[dbo].[CountryList].' + @CRLF
AS NVARCHAR(MAX)) AS OutputText
INTO #TestOutput
EXEC tSQLt.AssertEqualsTable '#TestOutput', 'SqlUtils.tSQLt.CaptureOutputLog'
END
GO
CREATE PROCEDURE testUseWhereJoinIds.[test @use + @ids + ImportDeleted works]
AS
BEGIN
DECLARE @CRLF CHAR(2) = CHAR(13) + CHAR(10)
EXEC tSQLt.CaptureOutput 'EXEC ImportDeleted ''SqlUtilsTests_A..CountryTable'', ''SqlUtilsTests_C..CountryList'', @use=''countryid, country'', @ids=''150-160'''
SELECT CAST (
'' + @CRLF +
'Importing deleted rows...' + @CRLF +
'Requested import completed with no errors. Deleted 2 rows from [ours].' + @CRLF +
'' + @CRLF +
'No data differences found between OURS <<< [SqlUtilsTests_A].[dbo].[CountryTable] and THEIRS >>> [SqlUtilsTests_C].[dbo].[CountryList].' + @CRLF
AS NVARCHAR(MAX)) AS OutputText
INTO #TestOutput
EXEC tSQLt.AssertEqualsTable '#TestOutput', 'SqlUtils.tSQLt.CaptureOutputLog'
END
GO
CREATE PROCEDURE testUseWhereJoinIds.[test ImportChanged with all join columns works]
AS
BEGIN
DECLARE @CRLF CHAR(2) = CHAR(13) + CHAR(10)
DECLARE @rowcount INT
EXEC tSQLt.CaptureOutput 'EXEC ImportChanged ''SqlUtilsTests_A..CountryTable'', ''SqlUtilsTests_C..CountryList'', @use=''countryid, country'', @showSql = 1'
EXEC tSQLt.CaptureOutput 'EXEC ImportChanged ''SqlUtilsTests_A..CountryTable'', ''SqlUtilsTests_C..CountryList'', @use=''countryid, country'', @join=''countryid, country'', @showSql = 1'
-- two rows
SELECT @rowcount = COUNT(*)
FROM SqlUtils.tSQLt.CaptureOutputLog
EXEC tSQLt.AssertEquals 2, @rowcount
-- both did no updates
SELECT @rowcount = COUNT(*)
FROM SqlUtils.tSQLt.CaptureOutputLog
WHERE OutputText LIKE '%Updated 0 rows%'
EXEC tSQLt.AssertEquals 2, @rowcount
-- second row has special SQL required for all join columns situation
DECLARE @id INT
SELECT @id = id
FROM SqlUtils.tSQLt.CaptureOutputLog
WHERE OutputText LIKE '%0 = 1%'
EXEC tSQLt.AssertEquals 1, @@ROWCOUNT
EXEC tSQLt.AssertEquals 2, @id
END
GO
|
SET IDENTITY_INSERT [dbo].[PersonTitleType] ON
GO
MERGE INTO [dbo].[PersonTitleType] AS TARGET
USING (VALUES
(0, N'', N'', N'Please Select'),
(1, N'', N'', N'Mr'),
(2, N'', N'', N'Ms'),
(3, N'', N'', N'Miss'),
(4, N'', N'', N'Mrs'),
(5, N'', N'', N'Master'),
(6, N'', N'', N'Other (please specify)')
)
AS SOURCE (PersonTitleTypeId, CodeName, ShortName, FullName)
ON TARGET.PersonTitleTypeId = SOURCE.PersonTitleTypeId
WHEN MATCHED THEN
UPDATE SET CodeName = SOURCE.CodeName, ShortName = SOURCE.ShortName, FullName = SOURCE.FullName
WHEN NOT MATCHED BY TARGET THEN
INSERT (PersonTitleTypeId, CodeName, ShortName, FullName)
VALUES (PersonTitleTypeId, CodeName, ShortName, FullName)
WHEN NOT MATCHED BY SOURCE THEN
DELETE;
SELECT * FROM [dbo].[PersonTitleType]
SET IDENTITY_INSERT [dbo].[PersonTitleType] OFF
GO
|
SELECT DISTINCT city FROM station WHERE city REGEXP '^[aeiou]' AND city REGEXP '[aeiou]$'; |
ALTER TABLE users ADD COLUMN sso_id varchar(255) DEFAULT NULL;
ALTER TABLE users MODIFY password varchar(255);
|
-- file:triggers.sql ln:1810 expect:true
create table trig_table (a int, b text,
foreign key (a) references refd_table on update cascade on delete cascade
)
|
<reponame>ejsmith/jasper<filename>src/Jasper.Persistence.SqlServer/Schema/Drop.sql
DROP PROCEDURE IF EXISTS %SCHEMA%.uspDeleteIncomingEnvelopes;
DROP PROCEDURE IF EXISTS %SCHEMA%.uspDeleteOutgoingEnvelopes;
DROP PROCEDURE IF EXISTS %SCHEMA%.uspDiscardAndReassignOutgoing;
DROP PROCEDURE IF EXISTS %SCHEMA%.uspMarkIncomingOwnership;
DROP PROCEDURE IF EXISTS %SCHEMA%.uspMarkOutgoingOwnership;
IF OBJECT_ID('%SCHEMA%.jasper_outgoing_envelopes', 'U') IS NOT NULL
drop table %SCHEMA%.jasper_outgoing_envelopes;
IF OBJECT_ID('%SCHEMA%.jasper_incoming_envelopes', 'U') IS NOT NULL
drop table %SCHEMA%.jasper_incoming_envelopes;
IF OBJECT_ID('%SCHEMA%.jasper_dead_letters', 'U') IS NOT NULL
drop table %SCHEMA%.jasper_dead_letters;
drop type IF EXISTS %SCHEMA%.EnvelopeIdList;
|
<gh_stars>100-1000
/****** Object: Table [dbo].[Devices] Script Date: 3/24/2016 7:53:08 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].[Devices]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Devices](
[Id] [nvarchar](128) NOT NULL,
[Name] [nvarchar](max) NULL,
[Version] [timestamp] NOT NULL,
[CreatedAt] [datetimeoffset](7) NOT NULL,
[UpdatedAt] [datetimeoffset](7) NULL,
[Deleted] [bit] NOT NULL,
[UserProfile_Id] [nvarchar](128) NULL,
CONSTRAINT [PK_dbo.Devices] PRIMARY KEY NONCLUSTERED
(
[Id] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF)
)
END
GO
/****** Object: Index [IX_CreatedAt] Script Date: 3/24/2016 7:53:08 PM ******/
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Devices]') AND name = N'IX_CreatedAt')
CREATE CLUSTERED INDEX [IX_CreatedAt] ON [dbo].[Devices]
(
[CreatedAt] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = OFF)
GO
/****** Object: Table [dbo].[factMLOutputData] Script Date: 3/24/2016 7:53:08 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].[factMLOutputData]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[factMLOutputData](
[id] [int] IDENTITY(1,1) NOT NULL,
[tripId] [nvarchar](50) NULL,
[userId] [nvarchar](50) NULL,
[tripstarttime] [nvarchar](50) NULL,
[driverType] [nvarchar](50) NULL,
PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF)
)
END
GO
/****** Object: Table [dbo].[IOTHubDatas] Script Date: 3/24/2016 7:53:09 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].[IOTHubDatas]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[IOTHubDatas](
[Id] [nvarchar](128) NOT NULL,
[Version] [timestamp] NOT NULL,
[CreatedAt] [datetimeoffset](7) NOT NULL,
[UpdatedAt] [datetimeoffset](7) NULL,
[Deleted] [bit] NOT NULL,
CONSTRAINT [PK_dbo.IOTHubDatas] PRIMARY KEY NONCLUSTERED
(
[Id] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF)
)
END
GO
/****** Object: Index [IX_CreatedAt] Script Date: 3/24/2016 7:53:09 PM ******/
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[IOTHubDatas]') AND name = N'IX_CreatedAt')
CREATE CLUSTERED INDEX [IX_CreatedAt] ON [dbo].[IOTHubDatas]
(
[CreatedAt] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = OFF)
GO
/****** Object: Table [dbo].[POIs] Script Date: 3/24/2016 7:53:09 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].[POIs]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[POIs](
[Id] [nvarchar](128) NOT NULL,
[TripId] [nvarchar](max) NULL,
[Latitude] [float] NOT NULL,
[Longitude] [float] NOT NULL,
[POIType] [int] NOT NULL,
[RecordedTimeStamp] [nvarchar](50) NULL,
[Version] [timestamp] NOT NULL,
[CreatedAt] [datetimeoffset](7) NOT NULL,
[UpdatedAt] [datetimeoffset](7) NULL,
[Deleted] [bit] NOT NULL,
[Timestamp] [datetime] NOT NULL,
CONSTRAINT [PK_dbo.POIs] PRIMARY KEY NONCLUSTERED
(
[Id] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF)
)
END
GO
/****** Object: Table [dbo].[TripPoints] Script Date: 3/24/2016 7:53:10 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].[TripPoints]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[TripPoints](
[Id] [nvarchar](128) NOT NULL,
[TripId] [nvarchar](128) NULL,
[Latitude] [float] NOT NULL,
[Longitude] [float] NOT NULL,
[Speed] [float] NOT NULL,
[RecordedTimeStamp] [datetime] NOT NULL,
[Sequence] [int] NOT NULL,
[RPM] [float] NOT NULL,
[ShortTermFuelBank] [float] NOT NULL,
[LongTermFuelBank] [float] NOT NULL,
[ThrottlePosition] [float] NOT NULL,
[RelativeThrottlePosition] [float] NOT NULL,
[Runtime] [float] NOT NULL,
[DistanceWithMalfunctionLight] [float] NOT NULL,
[EngineLoad] [float] NOT NULL,
[MassFlowRate] [float] NOT NULL,
[EngineFuelRate] [float] NOT NULL,
[VIN] [nvarchar](max) NULL,
[HasOBDData] [bit] NOT NULL,
[HasSimulatedOBDData] [bit] NOT NULL,
[Version] [timestamp] NOT NULL,
[CreatedAt] [datetimeoffset](7) NOT NULL,
[UpdatedAt] [datetimeoffset](7) NULL,
[Deleted] [bit] NOT NULL,
CONSTRAINT [PK_dbo.TripPoints] PRIMARY KEY NONCLUSTERED
(
[Id] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF)
)
END
GO
/****** Object: Index [IX_CreatedAt] Script Date: 3/24/2016 7:53:13 PM ******/
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[TripPoints]') AND name = N'IX_CreatedAt')
CREATE CLUSTERED INDEX [IX_CreatedAt] ON [dbo].[TripPoints]
(
[CreatedAt] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = OFF)
GO
/****** Object: Table [dbo].[Trips] Script Date: 3/24/2016 7:53:13 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].[Trips]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Trips](
[Id] [nvarchar](128) NOT NULL,
[Name] [nvarchar](max) NULL,
[UserId] [nvarchar](max) NULL,
[RecordedTimeStamp] [datetime] NOT NULL,
[EndTimeStamp] [datetime] NOT NULL,
[Rating] [int] NOT NULL,
[IsComplete] [bit] NOT NULL,
[HasSimulatedOBDData] [bit] NOT NULL,
[AverageSpeed] [float] NOT NULL,
[FuelUsed] [float] NOT NULL,
[HardStops] [bigint] NOT NULL,
[HardAccelerations] [bigint] NOT NULL,
[MainPhotoUrl] [nvarchar](max) NULL,
[Distance] [float] NOT NULL,
[Version] [timestamp] NOT NULL,
[CreatedAt] [datetimeoffset](7) NOT NULL,
[UpdatedAt] [datetimeoffset](7) NULL,
[Deleted] [bit] NOT NULL,
CONSTRAINT [PK_dbo.Trips] PRIMARY KEY NONCLUSTERED
(
[Id] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF)
)
END
GO
/****** Object: Index [IX_CreatedAt] Script Date: 3/24/2016 7:53:15 PM ******/
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Trips]') AND name = N'IX_CreatedAt')
CREATE CLUSTERED INDEX [IX_CreatedAt] ON [dbo].[Trips]
(
[CreatedAt] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = OFF)
GO
/****** Object: Table [dbo].[UserProfiles] Script Date: 3/24/2016 7:53:15 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].[UserProfiles]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[UserProfiles](
[Id] [nvarchar](128) NOT NULL,
[FirstName] [nvarchar](max) NULL,
[LastName] [nvarchar](max) NULL,
[UserId] [nvarchar](max) NULL,
[ProfilePictureUri] [nvarchar](max) NULL,
[Rating] [int] NOT NULL,
[Ranking] [int] NOT NULL,
[TotalDistance] [float] NOT NULL,
[TotalTrips] [bigint] NOT NULL,
[TotalTime] [bigint] NOT NULL,
[HardStops] [bigint] NOT NULL,
[HardAccelerations] [bigint] NOT NULL,
[FuelConsumption] [float] NOT NULL,
[MaxSpeed] [float] NOT NULL,
[Version] [timestamp] NOT NULL,
[CreatedAt] [datetimeoffset](7) NOT NULL,
[UpdatedAt] [datetimeoffset](7) NULL,
[Deleted] [bit] NOT NULL,
CONSTRAINT [PK_dbo.UserProfiles] PRIMARY KEY NONCLUSTERED
(
[Id] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF)
)
END
GO
/****** Object: Index [IX_CreatedAt] Script Date: 3/24/2016 7:53:17 PM ******/
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[UserProfiles]') AND name = N'IX_CreatedAt')
CREATE CLUSTERED INDEX [IX_CreatedAt] ON [dbo].[UserProfiles]
(
[CreatedAt] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = OFF)
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [IX_UserProfile_Id] Script Date: 3/24/2016 7:53:17 PM ******/
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Devices]') AND name = N'IX_UserProfile_Id')
CREATE NONCLUSTERED INDEX [IX_UserProfile_Id] ON [dbo].[Devices]
(
[UserProfile_Id] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = OFF)
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [IX_TripId] Script Date: 3/24/2016 7:53:17 PM ******/
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[TripPoints]') AND name = N'IX_TripId')
CREATE NONCLUSTERED INDEX [IX_TripId] ON [dbo].[TripPoints]
(
[TripId] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = OFF)
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__Devices__Id__4E88ABD4]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='Id' AND object_id = object_id('dbo.Devices')) IS NULL
BEGIN
ALTER TABLE [dbo].[Devices] ADD DEFAULT (newid()) FOR [Id]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__Devices__Created__4F7CD00D]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='CreatedAt' AND object_id = object_id('dbo.Devices')) IS NULL
BEGIN
ALTER TABLE [dbo].[Devices] ADD DEFAULT (sysutcdatetime()) FOR [CreatedAt]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__IOTHubDatas__Id__36B12243]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='Id' AND object_id = object_id('dbo.IOTHubDatas')) IS NULL
BEGIN
ALTER TABLE [dbo].[IOTHubDatas] ADD DEFAULT (newid()) FOR [Id]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__IOTHubDat__Creat__37A5467C]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='CreatedAt' AND object_id = object_id('dbo.IOTHubDatas')) IS NULL
BEGIN
ALTER TABLE [dbo].[IOTHubDatas] ADD DEFAULT (sysutcdatetime()) FOR [CreatedAt]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__POIs__Id__3B75D760]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='Id' AND object_id = object_id('dbo.POIs')) IS NULL
BEGIN
ALTER TABLE [dbo].[POIs] ADD DEFAULT (newid()) FOR [Id]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__POIs__CreatedAt__3C69FB99]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='CreatedAt' AND object_id = object_id('dbo.POIs')) IS NULL
BEGIN
ALTER TABLE [dbo].[POIs] ADD DEFAULT (sysutcdatetime()) FOR [CreatedAt]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__POIs__Timestamp__5535A963]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='Timestamp' AND object_id = object_id('dbo.POIs')) IS NULL
BEGIN
ALTER TABLE [dbo].[POIs] ADD DEFAULT ('1900-01-01T00:00:00.000') FOR [Timestamp]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__TripPoints__Id__403A8C7D]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='Id' AND object_id = object_id('dbo.TripPoints')) IS NULL
BEGIN
ALTER TABLE [dbo].[TripPoints] ADD DEFAULT (newid()) FOR [Id]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__TripPoint__Creat__412EB0B6]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='CreatedAt' AND object_id = object_id('dbo.TripPoints')) IS NULL
BEGIN
ALTER TABLE [dbo].[TripPoints] ADD DEFAULT (sysutcdatetime()) FOR [CreatedAt]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__Trips__Id__44FF419A]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='Id' AND object_id = object_id('dbo.Trips')) IS NULL
BEGIN
ALTER TABLE [dbo].[Trips] ADD DEFAULT (newid()) FOR [Id]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__Trips__CreatedAt__45F365D3]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='CreatedAt' AND object_id = object_id('dbo.Trips')) IS NULL
BEGIN
ALTER TABLE [dbo].[Trips] ADD DEFAULT (sysutcdatetime()) FOR [CreatedAt]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__UserProfiles__Id__49C3F6B7]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='Id' AND object_id = object_id('dbo.UserProfiles')) IS NULL
BEGIN
ALTER TABLE [dbo].[UserProfiles] ADD DEFAULT (newid()) FOR [Id]
END
GO
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DF__UserProfi__Creat__4AB81AF0]') AND type = 'D')
IF (SELECT object_definition(default_object_id) AS definition FROM sys.columns WHERE name ='CreatedAt' AND object_id = object_id('dbo.UserProfiles')) IS NULL
BEGIN
ALTER TABLE [dbo].[UserProfiles] ADD DEFAULT (sysutcdatetime()) FOR [CreatedAt]
END
GO
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_dbo.Devices_dbo.UserProfiles_UserProfile_Id]') AND parent_object_id = OBJECT_ID(N'[dbo].[Devices]'))
ALTER TABLE [dbo].[Devices] WITH CHECK ADD CONSTRAINT [FK_dbo.Devices_dbo.UserProfiles_UserProfile_Id] FOREIGN KEY([UserProfile_Id])
REFERENCES [dbo].[UserProfiles] ([Id])
GO
IF EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_dbo.Devices_dbo.UserProfiles_UserProfile_Id]') AND parent_object_id = OBJECT_ID(N'[dbo].[Devices]'))
ALTER TABLE [dbo].[Devices] CHECK CONSTRAINT [FK_dbo.Devices_dbo.UserProfiles_UserProfile_Id]
GO
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_dbo.TripPoints_dbo.Trips_TripId]') AND parent_object_id = OBJECT_ID(N'[dbo].[TripPoints]'))
ALTER TABLE [dbo].[TripPoints] WITH CHECK ADD CONSTRAINT [FK_dbo.TripPoints_dbo.Trips_TripId] FOREIGN KEY([TripId])
REFERENCES [dbo].[Trips] ([Id])
GO
IF EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_dbo.TripPoints_dbo.Trips_TripId]') AND parent_object_id = OBJECT_ID(N'[dbo].[TripPoints]'))
ALTER TABLE [dbo].[TripPoints] CHECK CONSTRAINT [FK_dbo.TripPoints_dbo.Trips_TripId]
GO
/****** Object: Trigger [dbo].[TR_dbo_Devices_InsertUpdateDelete] Script Date: 3/24/2016 7:53:17 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[TR_dbo_Devices_InsertUpdateDelete]'))
EXEC dbo.sp_executesql @statement = N'CREATE TRIGGER [dbo].[TR_dbo_Devices_InsertUpdateDelete] ON [dbo].[Devices] AFTER INSERT, UPDATE, DELETE AS BEGIN UPDATE [dbo].[Devices] SET [dbo].[Devices].[UpdatedAt] = CONVERT(DATETIMEOFFSET, SYSUTCDATETIME()) FROM INSERTED WHERE inserted.[Id] = [dbo].[Devices].[Id] END'
GO
ALTER TABLE [dbo].[Devices] ENABLE TRIGGER [TR_dbo_Devices_InsertUpdateDelete]
GO
/****** Object: Trigger [dbo].[UpdateRatings] Script Date: 3/24/2016 7:53:17 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[UpdateRatings]'))
EXEC dbo.sp_executesql @statement = N'CREATE TRIGGER [dbo].[UpdateRatings] ON [dbo].[factMLOutputData]
FOR INSERT
AS
-- Do it for all rows (maybe bulk insert) inserted
DECLARE crs CURSOR FOR
SELECT userId FROM inserted
DECLARE @UId varchar(100)
OPEN crs
FETCH NEXT FROM crs INTO @UId
WHILE @@FETCH_STATUS = 0
BEGIN
WITH all_scores AS (
SELECT userId, COUNT(driverType) as a_s FROM dbo.factMLOutputData GROUP BY userId),
good_scores AS (
SELECT userId, COUNT(driverType) as g_s FROM dbo.factMLOutputData WHERE driverType = ''Good'' GROUP BY userId),
ratings AS (
SELECT all_scores.userId as ui, CAST( (100 * g_s)/a_s AS INT) as r FROM all_scores, good_scores WHERE all_scores.userId = good_scores.userId)
UPDATE UserProfiles SET UserProfiles.Rating = ratings.r FROM ratings WHERE UserProfiles.UserId = ratings.ui AND UserProfiles.UserId = @UId;
FETCH NEXT FROM crs INTO @UId
END
CLOSE crs
DEALLOCATE crs'
GO
ALTER TABLE [dbo].[factMLOutputData] ENABLE TRIGGER [UpdateRatings]
GO
/****** Object: Trigger [dbo].[TR_dbo_IOTHubDatas_InsertUpdateDelete] Script Date: 3/24/2016 7:53:17 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[TR_dbo_IOTHubDatas_InsertUpdateDelete]'))
EXEC dbo.sp_executesql @statement = N'CREATE TRIGGER [dbo].[TR_dbo_IOTHubDatas_InsertUpdateDelete] ON [dbo].[IOTHubDatas] AFTER INSERT, UPDATE, DELETE AS BEGIN UPDATE [dbo].[IOTHubDatas] SET [dbo].[IOTHubDatas].[UpdatedAt] = CONVERT(DATETIMEOFFSET, SYSUTCDATETIME()) FROM INSERTED WHERE inserted.[Id] = [dbo].[IOTHubDatas].[Id] END'
GO
ALTER TABLE [dbo].[IOTHubDatas] ENABLE TRIGGER [TR_dbo_IOTHubDatas_InsertUpdateDelete]
GO
/****** Object: Trigger [dbo].[UpdateUserProfilesOnInsert] Script Date: 3/24/2016 7:53:17 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[UpdateUserProfilesOnInsert]'))
EXEC dbo.sp_executesql @statement = N'CREATE TRIGGER [dbo].[UpdateUserProfilesOnInsert] ON [dbo].[POIs]
FOR INSERT
AS
-- Do it for all rows inserted (maybe bulk insert)
DECLARE crs CURSOR FOR
SELECT TripId FROM inserted
DECLARE @TId nvarchar(100)
OPEN crs
FETCH NEXT FROM crs INTO @TId
WHILE @@FETCH_STATUS = 0
BEGIN
-- Update Accelerations
WITH ascnt1 AS (
SELECT p.TripId, up.UserId, COUNT(p.POIType) AS cnt1
FROM dbo.POIs AS p INNER JOIN
dbo.Trips AS t ON p.TripId = t.Id INNER JOIN
dbo.UserProfiles AS up ON t.UserId = up.UserId
WHERE (p.POIType = 1)
GROUP BY p.TripId, up.UserId
)
UPDATE dbo.UserProfiles SET dbo.UserProfiles.HardAccelerations = ascnt1.cnt1 FROM ascnt1
WHERE ascnt1.TripId = @TId AND dbo.UserProfiles.UserId = ascnt1.UserId;
-- Update Hard Stops
WITH ascnt2 AS (
SELECT p.TripId, up.UserId, COUNT(p.POIType) AS cnt2
FROM dbo.POIs AS p INNER JOIN
dbo.Trips AS t ON p.TripId = t.Id INNER JOIN
dbo.UserProfiles AS up ON t.UserId = up.UserId
WHERE (p.POIType = 2)
GROUP BY p.TripId, up.UserId
)
UPDATE dbo.UserProfiles SET dbo.UserProfiles.HardStops = ascnt2.cnt2 FROM ascnt2
WHERE ascnt2.TripId = @TId AND dbo.UserProfiles.UserId = ascnt2.UserId;
FETCH NEXT FROM crs INTO @TId
END
CLOSE crs
DEALLOCATE crs'
GO
ALTER TABLE [dbo].[POIs] ENABLE TRIGGER [UpdateUserProfilesOnInsert]
GO
/****** Object: Trigger [dbo].[TR_dbo_TripPoints_InsertUpdateDelete] Script Date: 3/24/2016 7:53:17 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[TR_dbo_TripPoints_InsertUpdateDelete]'))
EXEC dbo.sp_executesql @statement = N'CREATE TRIGGER [dbo].[TR_dbo_TripPoints_InsertUpdateDelete] ON [dbo].[TripPoints] AFTER INSERT, UPDATE, DELETE AS BEGIN UPDATE [dbo].[TripPoints] SET [dbo].[TripPoints].[UpdatedAt] = CONVERT(DATETIMEOFFSET, SYSUTCDATETIME()) FROM INSERTED WHERE inserted.[Id] = [dbo].[TripPoints].[Id] END'
GO
ALTER TABLE [dbo].[TripPoints] ENABLE TRIGGER [TR_dbo_TripPoints_InsertUpdateDelete]
GO
/****** Object: Trigger [dbo].[TR_dbo_Trips_InsertUpdateDelete] Script Date: 3/24/2016 7:53:17 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[TR_dbo_Trips_InsertUpdateDelete]'))
EXEC dbo.sp_executesql @statement = N'CREATE TRIGGER [dbo].[TR_dbo_Trips_InsertUpdateDelete] ON [dbo].[Trips] AFTER INSERT, UPDATE, DELETE AS BEGIN UPDATE [dbo].[Trips] SET [dbo].[Trips].[UpdatedAt] = CONVERT(DATETIMEOFFSET, SYSUTCDATETIME()) FROM INSERTED WHERE inserted.[Id] = [dbo].[Trips].[Id] END'
GO
ALTER TABLE [dbo].[Trips] ENABLE TRIGGER [TR_dbo_Trips_InsertUpdateDelete]
GO
/****** Object: Trigger [dbo].[TR_dbo_UserProfiles_InsertUpdateDelete] Script Date: 3/24/2016 7:53:17 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[TR_dbo_UserProfiles_InsertUpdateDelete]'))
EXEC dbo.sp_executesql @statement = N'CREATE TRIGGER [dbo].[TR_dbo_UserProfiles_InsertUpdateDelete] ON [dbo].[UserProfiles] AFTER INSERT, UPDATE, DELETE AS BEGIN UPDATE [dbo].[UserProfiles] SET [dbo].[UserProfiles].[UpdatedAt] = CONVERT(DATETIMEOFFSET, SYSUTCDATETIME()) FROM INSERTED WHERE inserted.[Id] = [dbo].[UserProfiles].[Id] END'
GO
ALTER TABLE [dbo].[UserProfiles] ENABLE TRIGGER [TR_dbo_UserProfiles_InsertUpdateDelete]
GO
|
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 23, 2021 at 04:41 PM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `apidb`
--
-- --------------------------------------------------------
--
-- Table structure for table `books`
--
CREATE TABLE `books` (
`id` int(11) NOT NULL,
`title` varchar(512) NOT NULL,
`author` varchar(256) NOT NULL,
`created` datetime NOT NULL,
`description` longtext NOT NULL,
`year` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `books`
--
INSERT INTO `books` (`id`, `title`, `author`, `created`, `description`, `year`) VALUES
(1, 'Scrum', '<NAME>', '2021-10-23 15:40:16', 'Does your business rely on a software development framework? Is your current method failing to help you achieve your aims? Have you considered Scrum as an alternative? Most business models need a software framework that can help them to be more efficient. In the past many such frameworks failed as they were conceived as stand-alone concepts that relied on individuals. But Scrum is different and relies on teamwork to achieve its goals.', 2019),
(2, 'Software Developer Life', '<NAME>', '2021-10-23 15:40:16', 'Software Developer Life -- Career, Learning, Coding, Daily Life, Stories\r\nWe\'ve made a dent into the 21st century and software has been eating the world. Suspenseful tech dramas play out in the news, boot camps churn out entry-level developers in a matter of months, and there\'s even an HBO show dedicated to Silicon Valley.', 2018),
(3, 'Introduction to Disciplined Agile Delivery 2nd Edition', '<NAME>, <NAME>', '2021-10-23 15:43:57', 'Introduction to Disciplined Agile Delivery 2nd Edition provides a quick overview of how agile software development works from beginning-to-end. It describes Disciplined Agile Delivery (DAD), the first of four levels of the Disciplined Agile (DA) process improvement toolkit, and works through a case study describing a typical agile team’s experiences adopting a DA approach.The book describes how the team develops the first release of a mission-critical application while working in a legacy enterprise environment.', 2018),
(4, 'Effective Ruby', '<NAME>', '2021-10-23 15:43:57', 'New', 2014),
(5, 'Programming Beyond Practices', '<NAME>', '2021-10-23 15:46:27', 'Writing code is the easy part of your work as a software developer. This practical book lets you explore the other 90%—everything from requirements discovery and rapid prototyping to business analysis and designing for maintainability. Instead of providing neatly packaged advice from on high, author <NAME> presents detailed examples of the many problems developers encounter, including the thought process it takes to solve them\r\nHe does this in an unusual and entertaining fashion by making you the main character in a series of chapter-length stories.', 2016);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `books`
--
ALTER TABLE `books`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `books`
--
ALTER TABLE `books`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
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 */;
|
<reponame>MCZbase/DDL<filename>TABLE/CTSHIPMENT_CARRIER.sql<gh_stars>1-10
CREATE TABLE "CTSHIPMENT_CARRIER"
( "SHIPMENT_CARRIER_CDE" VARCHAR2(25 CHAR) NOT NULL ENABLE,
CONSTRAINT "PKEY_CTSHIPMENT_CARRIER" PRIMARY KEY ("SHIPMENT_CARRIER_CDE")
USING INDEX ENABLE
) |
-- Deploy ggircs-portal:tables/application_revision_status_003 to pg
-- requires: tables/application_revision_status
-- requires: trigger_functions/restrict_old_application_submission
begin;
create trigger _restrict_old_application_submission
before insert on ggircs_portal.application_revision_status
for each row
execute procedure ggircs_portal_private.restrict_old_application_submission();
commit;
|
<gh_stars>1-10
/*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
update roles set abbv='System Administrator' where reference='Administrator';
update roles set reference='Sysadmin' where reference='Administrator';
insert into roles (role_id, reference, abbv, manager, enabled) values (ROLE_SEQ.nextval, 'Administrator', 'Administrator', 1, 1);
delete from rights;
insert into rights (select role_id, 'SessionDefaultCurrent' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SessionIndependent' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AllowTestSessions' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DepartmentIndependent' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StatusIndependent' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HasRole' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'IsAdmin' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Registration' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructionalOfferings' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructionalOfferingsExportPDF' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructionalOfferingsWorksheetPDF' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Classes' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ClassesExportPDF' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ClassAssignments' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ClassAssignmentsExportPdf' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ClassAssignmentsExportCsv' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructionalOfferingDetail' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AddCourseOffering' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EditCourseOffering' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'OfferingCanLock' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'OfferingCanUnlock' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'OfferingMakeNotOffered' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'OfferingMakeOffered' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'OfferingDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructionalOfferingCrossLists' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstrOfferingConfigAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstrOfferingConfigEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstrOfferingConfigEditDepartment' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstrOfferingConfigEditSubpart' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstrOfferingConfigDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'MultipleClassSetup' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'MultipleClassSetupDepartment' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'MultipleClassSetupClass' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AssignInstructors' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AssignInstructorsClass' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SchedulingSubpartDetail' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SchedulingSubpartDetailClearClassPreferences' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SchedulingSubpartEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SchedulingSubpartEditClearPreferences' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ClassDetail' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ClassEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ClassEditClearPreferences' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExtendedDatePatterns' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExtendedTimePatterns' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CanUseHardTimePrefs' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CanUseHardRoomPrefs' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CanUseHardDistributionPrefs' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CanUseHardPeriodPrefs' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ClassAssignment' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CurriculumView' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CurriculumDetail' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CurriculumAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CurriculumEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CurriculumDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CurriculumMerge' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CurriculumAdmin' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CurriculumProjectionRulesDetail' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CurriculumProjectionRulesEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Instructors' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructorsExportPdf' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ManageInstructors' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructorDetail' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructorAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructorEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructorEditClearPreferences' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructorDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructorPreferences' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Rooms' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomsExportPdf' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomsExportCsv' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomDetail' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditChangeControll' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditChangeExternalId' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditChangeType' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditChangeCapacity' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditChangeExaminationStatus' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditChangeRoomProperties' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomAvailability' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomDepartments' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EditRoomDepartments' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EditRoomDepartmentsFinalExams' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EditRoomDepartmentsMidtermExams' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AddRoom' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AddSpecialUseRoom' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AddSpecialUseRoomExternalRoom' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomDetailAvailability' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomDetailPeriodPreferences' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditAvailability' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditPreference' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditGroups' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditGlobalGroups' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditFeatures' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomEditGlobalFeatures' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AddNonUnivLocation' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'NonUniversityLocationEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'NonUniversityLocationDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomFeatures' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomFeaturesExportPdf' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'GlobalRoomFeatureAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DepartmentRoomFeatureAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DepartmenalRoomFeatureEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'GlobalRoomFeatureEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DepartmenalRoomFeatureDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'GlobalRoomFeatureDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomGroups' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomGroupsExportPdf' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'GlobalRoomGroupAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DepartmentRoomGroupAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DepartmenalRoomGroupEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'GlobalRoomGroupEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'GlobalRoomGroupEditSetDefault' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DepartmenalRoomGroupDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'GlobalRoomGroupDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TravelTimesLoad' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TravelTimesSave' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DistributionPreferences' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DistributionPreferenceAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DistributionPreferenceDetail' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DistributionPreferenceEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DistributionPreferenceDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DistributionPreferenceClass' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DistributionPreferenceSubpart' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DistributionPreferenceExam' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Reservations' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ReservationOffering' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ReservationAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ReservationEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ReservationDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CourseTimetabling' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CourseTimetablingAudit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Timetables' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimetablesSolutionExportCsv' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimetablesSolutionChangeNote' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimetablesSolutionCommit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimetablesSolutionLoad' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimetablesSolutionLoadEmpty' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimetablesSolutionDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Solver' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SolverSolutionSave' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SolverSolutionExportCsv' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SolverSolutionExportXml' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CanSelectSolverServer' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Suggestions' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimetableGrid' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AssignedClasses' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'NotAssignedClasses' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SolutionChanges' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AssignmentHistory' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ConflictStatistics' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SolverLog' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SolutionReports' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Examinations' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationDetail' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationEditClearPreferences' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationClone' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationAssignment' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationDistributionPreferences' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationDistributionPreferenceAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationDistributionPreferenceDetail' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationDistributionPreferenceEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationDistributionPreferenceDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationSchedule' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationTimetabling' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationSolver' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationTimetable' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AssignedExaminations' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'NotAssignedExaminations' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationAssignmentChanges' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationConflictStatistics' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationSolverLog' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationReports' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationPdfReports' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StudentScheduling' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EnrollmentAuditPDFReports' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StudentSectioningSolver' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StudentSectioningSolverLog' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StudentSectioningSolverDashboard' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CourseRequests' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SchedulingAssistant' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SchedulingDashboard' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ConsentApproval' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StudentSchedulingAdvisor' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StudentSchedulingAdmin' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'OfferingEnrollments' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StudentEnrollments' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Events' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventAddSpecial' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventAddCourseRelated' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventLookupContact' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventLookupSchedule' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventDetail' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventDate' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventLocation' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventLocationApprove' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventLocationOverbook' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventMeetingEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventMeetingApprove' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventApprovePast' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'EventAnyLocation' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AcademicSessions' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AcademicSessionAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AcademicSessionEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AcademicSessionDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimetableManagers' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimetableManagerAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimetableManagerEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimetableManagerDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Departments' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DepartmentAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DepartmentEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DepartmentEditChangeExternalManager' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DepartmentDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SolverGroups' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SubjectAreas' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SubjectAreaAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SubjectAreaEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SubjectAreaDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SubjectAreaChangeDepartment' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'BuildingList' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'BuildingAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'BuildingEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'BuildingDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'BuildingUpdateData' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'BuildingExportPdf' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DatePatterns' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TimePatterns' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExactTimes' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AcademicAreas' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AcademicAreaEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AcademicClassifications' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'AcademicClassificationEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Majors' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'MajorEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Minors' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'MinorEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StudentGroups' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StudentGroupEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ExaminationPeriods' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DataExchange' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SessionRollForward' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'LastChanges' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ManageSolvers' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SolverParameterGroups' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SolverParameters' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SolverConfigurations' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DistributionTypes' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'DistributionTypeEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructionalTypes' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructionalTypeAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructionalTypeEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'InstructionalTypeDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StatusTypes' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoomTypes' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SponsoringOrganizations' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SponsoringOrganizationAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SponsoringOrganizationEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SponsoringOrganizationDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StandardEventNotes' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Users' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'OfferingConsentTypes' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'OfferingConsentTypeEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CourseCreditFormats' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CourseCreditFormatEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CourseCreditTypes' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CourseCreditTypeEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CourseCreditUnits' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'CourseCreditUnitEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'PositionTypes' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'PositionTypeEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StudentSchedulingStatusTypes' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'StudentSchedulingStatusTypeEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Roles' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'RoleEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Permissions' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'PermissionEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'ApplicationConfig' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SettingsAdmin' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'PageStatistics' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HibernateStatistics' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'TestHQL' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Chameleon' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SettingsUser' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'Inquiry' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'PersonalSchedule' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'PersonalScheduleLookup' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HQLReports' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HQLReportAdd' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HQLReportEdit' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HQLReportDelete' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HQLReportsCourses' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HQLReportsExaminations' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HQLReportsStudents' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HQLReportsEvents' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HQLReportsAdministration' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'HQLReportsAdminOnly' as value from roles where reference = 'Sysadmin');
insert into rights (select role_id, 'SessionDefaultFirstFuture' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'HasRole' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructionalOfferings' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructionalOfferingsExportPDF' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructionalOfferingsWorksheetPDF' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'Classes' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ClassesExportPDF' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ClassAssignments' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ClassAssignmentsExportPdf' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ClassAssignmentsExportCsv' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructionalOfferingDetail' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'AddCourseOffering' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'EditCourseOffering' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'OfferingCanLock' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'OfferingCanUnlock' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'OfferingMakeNotOffered' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'OfferingMakeOffered' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructionalOfferingCrossLists' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstrOfferingConfigAdd' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstrOfferingConfigEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstrOfferingConfigEditDepartment' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstrOfferingConfigEditSubpart' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstrOfferingConfigDelete' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'MultipleClassSetup' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'MultipleClassSetupDepartment' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'MultipleClassSetupClass' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'AssignInstructors' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'AssignInstructorsClass' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SchedulingSubpartDetail' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SchedulingSubpartDetailClearClassPreferences' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SchedulingSubpartEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SchedulingSubpartEditClearPreferences' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ClassDetail' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ClassEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ClassEditClearPreferences' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CanUseHardTimePrefs' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CanUseHardRoomPrefs' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CanUseHardDistributionPrefs' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CanUseHardPeriodPrefs' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CurriculumView' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CurriculumDetail' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CurriculumAdd' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CurriculumEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CurriculumDelete' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CurriculumProjectionRulesDetail' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'Instructors' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructorsExportPdf' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ManageInstructors' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructorDetail' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructorAdd' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructorEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructorEditClearPreferences' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructorDelete' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'InstructorPreferences' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'Rooms' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomsExportPdf' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomsExportCsv' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomDetail' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomEditChangeExternalId' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomEditChangeType' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomEditChangeCapacity' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomEditChangeRoomProperties' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomAvailability' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomDepartments' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'EditRoomDepartments' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'AddSpecialUseRoom' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'AddSpecialUseRoomExternalRoom' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomDetailAvailability' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomEditAvailability' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomEditPreference' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomEditGroups' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomEditFeatures' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'AddNonUnivLocation' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'NonUniversityLocationEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'NonUniversityLocationDelete' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomFeatures' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomFeaturesExportPdf' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DepartmentRoomFeatureAdd' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DepartmenalRoomFeatureEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DepartmenalRoomFeatureDelete' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomGroups' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'RoomGroupsExportPdf' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DepartmentRoomGroupAdd' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DepartmenalRoomGroupEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DepartmenalRoomGroupDelete' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DistributionPreferences' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DistributionPreferenceAdd' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DistributionPreferenceDetail' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DistributionPreferenceEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DistributionPreferenceDelete' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DistributionPreferenceClass' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DistributionPreferenceSubpart' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'DistributionPreferenceExam' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'Reservations' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ReservationOffering' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ReservationAdd' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ReservationEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ReservationDelete' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CourseTimetabling' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'CourseTimetablingAudit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'Timetables' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'TimetablesSolutionExportCsv' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'TimetablesSolutionChangeNote' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'TimetablesSolutionCommit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'TimetablesSolutionLoad' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'TimetablesSolutionLoadEmpty' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'TimetablesSolutionDelete' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'Solver' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SolverSolutionSave' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SolverSolutionExportCsv' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'Suggestions' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'TimetableGrid' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'AssignedClasses' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'NotAssignedClasses' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SolutionChanges' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'AssignmentHistory' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ConflictStatistics' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SolverLog' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SolutionReports' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'Examinations' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationDetail' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationEditClearPreferences' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationDelete' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationClone' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationAdd' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationDistributionPreferences' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationDistributionPreferenceAdd' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationDistributionPreferenceDetail' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationDistributionPreferenceEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationDistributionPreferenceDelete' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationSchedule' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ExaminationPdfReports' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SchedulingAssistant' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SchedulingDashboard' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'ConsentApproval' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'OfferingEnrollments' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'StudentEnrollments' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'Events' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'EventAddSpecial' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'EventAddCourseRelated' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'EventLookupSchedule' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'EventDetail' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'EventEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'EventDate' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'EventLocation' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'EventMeetingEdit' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SettingsUser' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'Inquiry' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'PersonalSchedule' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'PersonalScheduleLookup' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'HQLReports' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'HQLReportsCourses' as value from roles where reference = 'Dept Sched Mgr');
insert into rights (select role_id, 'SessionDefaultCurrent' as value from roles where reference = 'View All');
insert into rights (select role_id, 'SessionIndependentIfNoSessionGiven' as value from roles where reference = 'View All');
insert into rights (select role_id, 'DepartmentIndependent' as value from roles where reference = 'View All');
insert into rights (select role_id, 'HasRole' as value from roles where reference = 'View All');
insert into rights (select role_id, 'InstructionalOfferings' as value from roles where reference = 'View All');
insert into rights (select role_id, 'InstructionalOfferingsExportPDF' as value from roles where reference = 'View All');
insert into rights (select role_id, 'InstructionalOfferingsWorksheetPDF' as value from roles where reference = 'View All');
insert into rights (select role_id, 'Classes' as value from roles where reference = 'View All');
insert into rights (select role_id, 'ClassesExportPDF' as value from roles where reference = 'View All');
insert into rights (select role_id, 'ClassAssignments' as value from roles where reference = 'View All');
insert into rights (select role_id, 'ClassAssignmentsExportPdf' as value from roles where reference = 'View All');
insert into rights (select role_id, 'ClassAssignmentsExportCsv' as value from roles where reference = 'View All');
insert into rights (select role_id, 'InstructionalOfferingDetail' as value from roles where reference = 'View All');
insert into rights (select role_id, 'SchedulingSubpartDetail' as value from roles where reference = 'View All');
insert into rights (select role_id, 'ClassDetail' as value from roles where reference = 'View All');
insert into rights (select role_id, 'CanUseHardTimePrefs' as value from roles where reference = 'View All');
insert into rights (select role_id, 'CanUseHardRoomPrefs' as value from roles where reference = 'View All');
insert into rights (select role_id, 'CanUseHardDistributionPrefs' as value from roles where reference = 'View All');
insert into rights (select role_id, 'CanUseHardPeriodPrefs' as value from roles where reference = 'View All');
insert into rights (select role_id, 'CurriculumView' as value from roles where reference = 'View All');
insert into rights (select role_id, 'CurriculumDetail' as value from roles where reference = 'View All');
insert into rights (select role_id, 'CurriculumProjectionRulesDetail' as value from roles where reference = 'View All');
insert into rights (select role_id, 'Instructors' as value from roles where reference = 'View All');
insert into rights (select role_id, 'InstructorsExportPdf' as value from roles where reference = 'View All');
insert into rights (select role_id, 'InstructorDetail' as value from roles where reference = 'View All');
insert into rights (select role_id, 'Rooms' as value from roles where reference = 'View All');
insert into rights (select role_id, 'RoomsExportPdf' as value from roles where reference = 'View All');
insert into rights (select role_id, 'RoomsExportCsv' as value from roles where reference = 'View All');
insert into rights (select role_id, 'RoomDetail' as value from roles where reference = 'View All');
insert into rights (select role_id, 'RoomAvailability' as value from roles where reference = 'View All');
insert into rights (select role_id, 'RoomDetailAvailability' as value from roles where reference = 'View All');
insert into rights (select role_id, 'RoomDetailPeriodPreferences' as value from roles where reference = 'View All');
insert into rights (select role_id, 'RoomFeatures' as value from roles where reference = 'View All');
insert into rights (select role_id, 'RoomFeaturesExportPdf' as value from roles where reference = 'View All');
insert into rights (select role_id, 'RoomGroups' as value from roles where reference = 'View All');
insert into rights (select role_id, 'RoomGroupsExportPdf' as value from roles where reference = 'View All');
insert into rights (select role_id, 'DistributionPreferences' as value from roles where reference = 'View All');
insert into rights (select role_id, 'DistributionPreferenceDetail' as value from roles where reference = 'View All');
insert into rights (select role_id, 'Examinations' as value from roles where reference = 'View All');
insert into rights (select role_id, 'ExaminationDetail' as value from roles where reference = 'View All');
insert into rights (select role_id, 'ExaminationDistributionPreferences' as value from roles where reference = 'View All');
insert into rights (select role_id, 'ExaminationDistributionPreferenceDetail' as value from roles where reference = 'View All');
insert into rights (select role_id, 'ExaminationSchedule' as value from roles where reference = 'View All');
insert into rights (select role_id, 'ExaminationPdfReports' as value from roles where reference = 'View All');
insert into rights (select role_id, 'SchedulingAssistant' as value from roles where reference = 'View All');
insert into rights (select role_id, 'SchedulingDashboard' as value from roles where reference = 'View All');
insert into rights (select role_id, 'OfferingEnrollments' as value from roles where reference = 'View All');
insert into rights (select role_id, 'StudentEnrollments' as value from roles where reference = 'View All');
insert into rights (select role_id, 'Events' as value from roles where reference = 'View All');
insert into rights (select role_id, 'EventAddSpecial' as value from roles where reference = 'View All');
insert into rights (select role_id, 'EventDetail' as value from roles where reference = 'View All');
insert into rights (select role_id, 'EventEdit' as value from roles where reference = 'View All');
insert into rights (select role_id, 'EventDate' as value from roles where reference = 'View All');
insert into rights (select role_id, 'EventLocation' as value from roles where reference = 'View All');
insert into rights (select role_id, 'EventMeetingEdit' as value from roles where reference = 'View All');
insert into rights (select role_id, 'SettingsUser' as value from roles where reference = 'View All');
insert into rights (select role_id, 'Inquiry' as value from roles where reference = 'View All');
insert into rights (select role_id, 'SessionDefaultFirstExamination' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'DepartmentIndependent' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'HasRole' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ClassAssignments' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ClassAssignmentsExportPdf' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ClassAssignmentsExportCsv' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'CanUseHardTimePrefs' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'CanUseHardRoomPrefs' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'CanUseHardDistributionPrefs' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'CanUseHardPeriodPrefs' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'Instructors' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'InstructorsExportPdf' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'InstructorDetail' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'Rooms' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'RoomsExportPdf' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'RoomsExportCsv' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'RoomDetail' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'RoomEdit' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'RoomEditChangeExaminationStatus' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'EditRoomDepartmentsFinalExams' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'EditRoomDepartmentsMidtermExams' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'RoomDetailPeriodPreferences' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'RoomFeatures' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'RoomFeaturesExportPdf' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'RoomGroups' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'RoomGroupsExportPdf' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'DistributionPreferenceExam' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'Examinations' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationDetail' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationEdit' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationEditClearPreferences' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationDelete' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationClone' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationAdd' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationAssignment' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationDistributionPreferences' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationDistributionPreferenceAdd' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationDistributionPreferenceDetail' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationDistributionPreferenceEdit' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationDistributionPreferenceDelete' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationSchedule' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationTimetabling' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationSolver' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationTimetable' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'AssignedExaminations' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'NotAssignedExaminations' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationAssignmentChanges' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationConflictStatistics' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationSolverLog' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationReports' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'ExaminationPdfReports' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'Events' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'EventAddSpecial' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'EventDetail' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'EventEdit' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'EventDate' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'EventLocation' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'EventMeetingEdit' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'SettingsUser' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'Inquiry' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'HQLReports' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'HQLReportsExaminations' as value from roles where reference = 'Exam Mgr');
insert into rights (select role_id, 'SessionDefaultCurrent' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'HasRole' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'CanUseHardTimePrefs' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'CanUseHardRoomPrefs' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'CanUseHardDistributionPrefs' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'CanUseHardPeriodPrefs' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'Rooms' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'RoomsExportPdf' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'RoomsExportCsv' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'RoomDetail' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'RoomEditChangeExternalId' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'RoomEditChangeType' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'RoomEditChangeCapacity' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'RoomEditChangeRoomProperties' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'AddSpecialUseRoom' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'AddSpecialUseRoomExternalRoom' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'AddNonUnivLocation' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'NonUniversityLocationEdit' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'NonUniversityLocationDelete' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'RoomFeatures' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'RoomFeaturesExportPdf' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'RoomGroups' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'RoomGroupsExportPdf' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'ExaminationSchedule' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'Events' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'EventAddSpecial' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'EventAddCourseRelated' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'EventLookupContact' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'EventDetail' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'EventEdit' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'EventDate' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'EventLocation' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'EventLocationApprove' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'EventLocationOverbook' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'EventMeetingEdit' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'EventMeetingApprove' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'SettingsUser' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'Inquiry' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'HQLReports' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'HQLReportsEvents' as value from roles where reference = 'Event Mgr');
insert into rights (select role_id, 'SessionDefaultCurrent' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'DepartmentIndependent' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'HasRole' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CanUseHardTimePrefs' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CanUseHardRoomPrefs' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CanUseHardDistributionPrefs' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CanUseHardPeriodPrefs' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CurriculumView' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CurriculumDetail' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CurriculumAdd' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CurriculumEdit' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CurriculumDelete' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CurriculumMerge' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CurriculumAdmin' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CurriculumProjectionRulesDetail' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'CurriculumProjectionRulesEdit' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'RoomAvailability' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'ExaminationSchedule' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'Events' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'EventAddSpecial' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'EventDetail' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'EventEdit' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'EventDate' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'EventLocation' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'EventMeetingEdit' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'SettingsUser' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'Inquiry' as value from roles where reference = 'Curriculum Mgr');
insert into rights (select role_id, 'SchedulingAssistant' as value from roles where reference = 'No Role');
insert into rights (select role_id, 'Events' as value from roles where reference = 'No Role');
insert into rights (select role_id, 'EventAddSpecial' as value from roles where reference = 'No Role');
insert into rights (select role_id, 'EventDetail' as value from roles where reference = 'No Role');
insert into rights (select role_id, 'EventEdit' as value from roles where reference = 'No Role');
insert into rights (select role_id, 'EventDate' as value from roles where reference = 'No Role');
insert into rights (select role_id, 'EventLocation' as value from roles where reference = 'No Role');
insert into rights (select role_id, 'EventMeetingEdit' as value from roles where reference = 'No Role');
insert into rights (select role_id, 'Inquiry' as value from roles where reference = 'No Role');
insert into rights (select role_id, 'SessionDefaultCurrent' as value from roles where reference = 'Student');
insert into rights (select role_id, 'CourseRequests' as value from roles where reference = 'Student');
insert into rights (select role_id, 'SchedulingAssistant' as value from roles where reference = 'Student');
insert into rights (select role_id, 'StudentEnrollments' as value from roles where reference = 'Student');
insert into rights (select role_id, 'Events' as value from roles where reference = 'Student');
insert into rights (select role_id, 'EventAddSpecial' as value from roles where reference = 'Student');
insert into rights (select role_id, 'EventDetail' as value from roles where reference = 'Student');
insert into rights (select role_id, 'EventEdit' as value from roles where reference = 'Student');
insert into rights (select role_id, 'EventDate' as value from roles where reference = 'Student');
insert into rights (select role_id, 'EventLocation' as value from roles where reference = 'Student');
insert into rights (select role_id, 'EventMeetingEdit' as value from roles where reference = 'Student');
insert into rights (select role_id, 'Inquiry' as value from roles where reference = 'Student');
insert into rights (select role_id, 'PersonalSchedule' as value from roles where reference = 'Student');
insert into rights (select role_id, 'SessionDefaultCurrent' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'SchedulingAssistant' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'SchedulingDashboard' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'ConsentApproval' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'OfferingEnrollments' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'Events' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'EventAddSpecial' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'EventDetail' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'EventEdit' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'EventDate' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'EventLocation' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'EventMeetingEdit' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'Inquiry' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'PersonalSchedule' as value from roles where reference = 'Instructor');
insert into rights (select role_id, 'SessionDefaultCurrent' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'DepartmentIndependent' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'HasRole' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'CanUseHardTimePrefs' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'CanUseHardRoomPrefs' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'CanUseHardDistributionPrefs' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'CanUseHardPeriodPrefs' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'ExaminationSchedule' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'CourseRequests' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'SchedulingAssistant' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'SchedulingDashboard' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'StudentSchedulingAdvisor' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'OfferingEnrollments' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'StudentEnrollments' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'Events' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'EventAddSpecial' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'EventLookupSchedule' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'EventDetail' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'EventEdit' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'EventDate' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'EventLocation' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'EventMeetingEdit' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'SettingsUser' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'Inquiry' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'PersonalSchedule' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'PersonalScheduleLookup' as value from roles where reference = 'Advisor');
insert into rights (select role_id, 'SessionDefaultCurrent' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DepartmentIndependent' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'StatusIndependent' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'HasRole' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'IsAdmin' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructionalOfferings' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructionalOfferingsExportPDF' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructionalOfferingsWorksheetPDF' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Classes' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ClassesExportPDF' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ClassAssignments' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ClassAssignmentsExportPdf' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ClassAssignmentsExportCsv' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructionalOfferingDetail' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AddCourseOffering' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EditCourseOffering' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'OfferingCanLock' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'OfferingCanUnlock' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'OfferingMakeNotOffered' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'OfferingMakeOffered' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'OfferingDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructionalOfferingCrossLists' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstrOfferingConfigAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstrOfferingConfigEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstrOfferingConfigEditDepartment' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstrOfferingConfigEditSubpart' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstrOfferingConfigDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'MultipleClassSetup' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'MultipleClassSetupDepartment' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'MultipleClassSetupClass' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AssignInstructors' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AssignInstructorsClass' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SchedulingSubpartDetail' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SchedulingSubpartDetailClearClassPreferences' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SchedulingSubpartEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SchedulingSubpartEditClearPreferences' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ClassDetail' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ClassEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ClassEditClearPreferences' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExtendedDatePatterns' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExtendedTimePatterns' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CanUseHardTimePrefs' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CanUseHardRoomPrefs' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CanUseHardDistributionPrefs' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CanUseHardPeriodPrefs' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ClassAssignment' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CurriculumView' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CurriculumDetail' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CurriculumAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CurriculumEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CurriculumDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CurriculumMerge' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CurriculumAdmin' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CurriculumProjectionRulesDetail' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CurriculumProjectionRulesEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Instructors' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructorsExportPdf' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ManageInstructors' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructorDetail' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructorAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructorEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructorEditClearPreferences' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructorDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructorPreferences' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Rooms' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomsExportPdf' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomsExportCsv' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomDetail' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditChangeControll' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditChangeExternalId' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditChangeType' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditChangeCapacity' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditChangeExaminationStatus' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditChangeRoomProperties' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomAvailability' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomDepartments' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EditRoomDepartments' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EditRoomDepartmentsFinalExams' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EditRoomDepartmentsMidtermExams' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AddRoom' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AddSpecialUseRoom' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AddSpecialUseRoomExternalRoom' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomDetailAvailability' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomDetailPeriodPreferences' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditAvailability' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditPreference' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditGroups' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditGlobalGroups' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditFeatures' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomEditGlobalFeatures' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AddNonUnivLocation' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'NonUniversityLocationEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'NonUniversityLocationDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomFeatures' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomFeaturesExportPdf' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'GlobalRoomFeatureAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DepartmentRoomFeatureAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DepartmenalRoomFeatureEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'GlobalRoomFeatureEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DepartmenalRoomFeatureDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'GlobalRoomFeatureDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomGroups' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'RoomGroupsExportPdf' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'GlobalRoomGroupAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DepartmentRoomGroupAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DepartmenalRoomGroupEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'GlobalRoomGroupEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'GlobalRoomGroupEditSetDefault' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DepartmenalRoomGroupDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'GlobalRoomGroupDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TravelTimesLoad' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TravelTimesSave' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DistributionPreferences' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DistributionPreferenceAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DistributionPreferenceDetail' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DistributionPreferenceEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DistributionPreferenceDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DistributionPreferenceClass' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DistributionPreferenceSubpart' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DistributionPreferenceExam' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Reservations' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ReservationOffering' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ReservationAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ReservationEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ReservationDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CourseTimetabling' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CourseTimetablingAudit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Timetables' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimetablesSolutionExportCsv' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimetablesSolutionChangeNote' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimetablesSolutionCommit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimetablesSolutionLoad' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimetablesSolutionLoadEmpty' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimetablesSolutionDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Solver' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SolverSolutionSave' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SolverSolutionExportCsv' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SolverSolutionExportXml' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CanSelectSolverServer' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Suggestions' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimetableGrid' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AssignedClasses' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'NotAssignedClasses' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SolutionChanges' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AssignmentHistory' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ConflictStatistics' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SolverLog' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SolutionReports' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Examinations' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationDetail' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationEditClearPreferences' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationClone' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationAssignment' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationDistributionPreferences' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationDistributionPreferenceAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationDistributionPreferenceDetail' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationDistributionPreferenceEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationDistributionPreferenceDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationSchedule' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationTimetabling' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationSolver' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationTimetable' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AssignedExaminations' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'NotAssignedExaminations' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationAssignmentChanges' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationConflictStatistics' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationSolverLog' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationReports' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationPdfReports' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'StudentScheduling' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EnrollmentAuditPDFReports' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'StudentSectioningSolver' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'StudentSectioningSolverLog' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'StudentSectioningSolverDashboard' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CourseRequests' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SchedulingAssistant' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SchedulingDashboard' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ConsentApproval' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'StudentSchedulingAdvisor' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'StudentSchedulingAdmin' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'OfferingEnrollments' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'StudentEnrollments' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Events' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventAddSpecial' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventAddCourseRelated' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventLookupContact' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventLookupSchedule' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventDetail' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventDate' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventLocation' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventLocationApprove' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventLocationOverbook' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventMeetingEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventMeetingApprove' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventApprovePast' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'EventAnyLocation' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AcademicSessions' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AcademicSessionEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimetableManagers' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimetableManagerAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimetableManagerEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimetableManagerDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Departments' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DepartmentAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DepartmentEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DepartmentEditChangeExternalManager' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DepartmentDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SolverGroups' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SubjectAreas' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SubjectAreaAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SubjectAreaEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SubjectAreaDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SubjectAreaChangeDepartment' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'BuildingList' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'BuildingAdd' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'BuildingEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'BuildingDelete' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'BuildingUpdateData' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'BuildingExportPdf' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DatePatterns' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'TimePatterns' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AcademicAreas' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AcademicAreaEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AcademicClassifications' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'AcademicClassificationEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Majors' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'MajorEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Minors' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'MinorEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'StudentGroups' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'StudentGroupEdit' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ExaminationPeriods' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'LastChanges' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'ManageSolvers' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'DistributionTypes' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'InstructionalTypes' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SponsoringOrganizations' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'OfferingConsentTypes' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CourseCreditFormats' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CourseCreditTypes' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'CourseCreditUnits' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'PositionTypes' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'StudentSchedulingStatusTypes' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Roles' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Permissions' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'SettingsUser' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'Inquiry' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'PersonalSchedule' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'PersonalScheduleLookup' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'HQLReports' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'HQLReportsCourses' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'HQLReportsExaminations' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'HQLReportsStudents' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'HQLReportsEvents' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'HQLReportsAdministration' as value from roles where reference = 'Administrator');
insert into rights (select role_id, 'HQLReportsAdminOnly' as value from roles where reference = 'Administrator');
/*
* Update database version
*/
update application_config set value='90' where name='tmtbl.db.version';
commit;
|
<filename>Wales/SQL/2-2_PHEN_CVD.sql
--************************************************************************************************
-- Script: 2-2_PHEN_CVD.sql
-- SAIL project: WMCC - Wales Multi-morbidity Cardiovascular COVID-19 UK (0911)
-- About: Create CVD related PHEN tables (primary care, hospital and death data)
-- Author: <NAME>
-- Health Data Research UK, Swansea University, 2021
-- ***********************************************************************************************
-- ***********************************************************************************************
-- Create a table containing all CVD related deaths for C20 cohort
-- ***********************************************************************************************
CREATE TABLE SAILWWMCCV.PHEN_DEATH_CVD (
alf_e bigint,
wob date,
dod date, -- WDSD dod in C20
gndr_cd char(1),
age_at_death decimal(7,2),
cod_underlying char(4),
cod_secondary char(4),
cod_ons_cdds char(17),
cod_ons_more_detail_cdds char(27),
cod1 char(4),
cod2 char(4),
cod3 char(4),
cod4 char(4),
cod5 char(4),
cod6 char(4),
cod7 char(4),
cod8 char(4),
death_sources char(9),
outcome_icd10 char(5),
outcome_name char(40),
outcome_term char(255),
outcome_category char(40)
)
DISTRIBUTE BY HASH(alf_e);
--DROP TABLE SAILWWMCCV.PHEN_DEATH_CVD;
TRUNCATE TABLE SAILWWMCCV.PHEN_DEATH_CVD IMMEDIATE;
----------------------------------------------------------------------------------------------
INSERT INTO SAILWWMCCV.PHEN_DEATH_CVD
SELECT alf_e,
wob,
dod,
gndr_cd,
age_at_death,
cod_underlying,
cod_secondary_adde,
cod_ons_cdds,
cod_ons_more_detail_cdds,
cod1,
cod2,
cod3,
cod4,
cod5,
cod6,
cod7,
cod8,
death_sources,
d.code AS outcome_icd10,
d.name AS outcome_name,
d.desc AS outcome_term,
d.category AS outcome_category
FROM SAILWMCCV.C19_COHORT20_MORTALITY c
JOIN (SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_TIA
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_TIA_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_AMI
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_AMI_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ANGINA
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_DIC
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ARTERY_DISSECT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ARTERY_DISSECT_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_CARDIOMYOPATHY
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_CARDIOMYOPATHY_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_DVT_DVT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_DVT_ICVT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_VT_CCU002
WHERE is_latest = 1
AND category <> 'VT_covariate_only'
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_HF
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_LIFE_ARRHYTHM
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_LIFE_ARRHYTHM_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_MESENTERIC_ANAEMIA
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_PE
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_PE_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_SCD
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_HS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_IS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_NOS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_SAH
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_ISCH_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_TCP
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_FRACTURE
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_MESENTERIC_THROMBUS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_MYOCARDITIS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ARTERIAL_EMBOLISM_OTHR
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_PERICARDITIS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_SAH_HS_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_THROMBOPHILIA
WHERE is_latest = 1
) d
ON (cod_underlying = code OR cod_secondary_adde = code
OR cod1 = code OR cod3 = code OR cod4 = code OR cod5 = code OR
cod5 = code OR cod6 = code OR cod7 = code OR cod8 = code)
WHERE is_latest = 1;
SELECT count(*), count(DISTINCT alf_e) FROM SAILWWMCCV.PHEN_DEATH_CVD;
-- ***********************************************************************************************
-- Create a table containing all CVD outcomes in PEDW for C20 cohort
-- ***********************************************************************************************
CREATE TABLE SAILWWMCCV.PHEN_PEDW_CVD (
alf_e bigint,
prov_unit_cd char(3),
spell_num_e bigint,
epi_num char(3),
gndr_cd char(1),
record_order int,
admis_dt date,
admis_mthd_cd char(2),
admis_source_cd char(2),
admis_spec_cd char(3),
disch_dt date,
disch_mthd_cd char(2),
disch_spec_cd char(3),
epi_str_dt date,
epi_end_dt date,
epi_diag_cd char(20),
res_ward_cd char(2),
diag_cd_123 char(5),
diag_cd char(20),
outcome_icd10 char(5),
outcome_name char(40),
outcome_term char(255),
outcome_category char(40)
)
DISTRIBUTE BY HASH(alf_e);
-- DROP TABLE SAILWWMCCV.PHEN_PEDW_CVD;
TRUNCATE TABLE SAILWWMCCV.PHEN_PEDW_CVD IMMEDIATE;
INSERT INTO SAILWWMCCV.PHEN_PEDW_CVD (alf_e,prov_unit_cd,spell_num_e,epi_num,gndr_cd,record_order,admis_dt,
admis_mthd_cd,admis_source_cd,admis_spec_cd,disch_dt,disch_mthd_cd,
disch_spec_cd,epi_str_dt,epi_end_dt,epi_diag_cd,res_ward_cd,
diag_cd_123,diag_cd,outcome_icd10,outcome_name,outcome_term,outcome_category)
SELECT s.alf_e,
s.prov_unit_cd,
s.spell_num_e,
e.epi_num,
s.gndr_cd,
ROW_NUMBER() OVER(PARTITION BY s.alf_e ORDER BY s.admis_dt, e.epi_str_dt) AS record_order,
s.admis_dt,
s.admis_mthd_cd,
s.admis_source_cd,
s.admis_spec_cd,
s.disch_dt,
s.disch_mthd_cd,
s.disch_spec_cd,
e.epi_str_dt,
e.epi_end_dt,
e.diag_cd_1234,
s.res_ward_cd,
d.diag_cd_123,
d.diag_cd,
d.code AS outcome_icd10,
d.name AS outcome_name,
d.desc AS outcome_term,
d.category AS outcome_category
FROM SAILWWMCCV.WMCC_PEDW_SPELL s
LEFT JOIN SAILWWMCCV.WMCC_PEDW_EPISODE e
ON s.prov_unit_cd = e.prov_unit_cd
AND s.spell_num_e = e.spell_num_e
LEFT JOIN SAILWWMCCV.WMCC_PEDW_DIAG d
ON e.prov_unit_cd = d.prov_unit_cd
AND e.spell_num_e = d.spell_num_e
AND e.epi_num = d.epi_num
JOIN (SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_TIA
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_TIA_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_AMI
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_AMI_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ANGINA
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_DIC
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ARTERY_DISSECT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ARTERY_DISSECT_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_CARDIOMYOPATHY
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_CARDIOMYOPATHY_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_DVT_DVT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_DVT_ICVT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_VT_CCU002
WHERE is_latest = 1
AND category <> 'VT_covariate_only'
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_HF
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_LIFE_ARRHYTHM
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_LIFE_ARRHYTHM_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_MESENTERIC_ANAEMIA
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_PE
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_PE_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_SCD
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_HS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_IS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_NOS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_SAH
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_ISCH_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_TCP
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_FRACTURE
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_MESENTERIC_THROMBUS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_MYOCARDITIS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ARTERIAL_EMBOLISM_OTHR
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_PERICARDITIS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_SAH_HS_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_THROMBOPHILIA
WHERE is_latest = 1
) d
ON (d.diag_cd_1234 = code OR d.diag_cd = code OR e.diag_cd_1234 = code OR e.diag_cd_123 = code)
WHERE s.admis_yr <= 2021
ORDER BY s.alf_e, s.admis_dt, e.epi_str_dt;
SELECT count(*), count(DISTINCT alf_e) FROM SAILWWMCCV.PHEN_PEDW_CVD;
-- ***********************************************************************************************
-- Create a table containing all CVD outcomes in OPDW for C20 cohort
-- ***********************************************************************************************
CREATE TABLE SAILWWMCCV.PHEN_OPDW_CVD (
alf_e bigint,
prov_unit_cd char(6),
case_rec_num_e bigint,
att_id_e bigint,
attend_dt date,
gndr_cd char(1),
record_order int,
priority_type_cd char(1),
outcome_cd char(1),
diag_cd_123 char(3),
diag_cd char(20),
diag_num int,
outcome_icd10 char(5),
outcome_name char(40),
outcome_term char(255),
outcome_category char(40)
)
DISTRIBUTE BY HASH(alf_e);
--DROP TABLE SAILWWMCCV.PHEN_OPDW_CVD;
TRUNCATE TABLE SAILWWMCCV.PHEN_OPDW_CVD IMMEDIATE;
INSERT INTO SAILWWMCCV.PHEN_OPDW_CVD (alf_e,prov_unit_cd,case_rec_num_e,att_id_e,attend_dt,gndr_cd,
record_order,priority_type_cd,outcome_cd,diag_cd_123,diag_cd,
diag_num,outcome_icd10,outcome_name,outcome_term,outcome_category)
SELECT alf_e,
o.prov_unit_cd,
o.case_rec_num_e,
o.att_id_e,
o.attend_dt,
gndr_cd,
ROW_NUMBER() OVER(PARTITION BY alf_e ORDER BY o.attend_dt) AS record_order,
priority_type_cd,
outcome_cd,
diag_cd_123,
CONCAT(diag_cd_123, diag_cd_4),
diag_num,
d.code AS outcome_icd10,
d.name AS outcome_name,
d.desc AS outcome_term,
d.category AS outcome_category
FROM SAILWMCCV.C19_COHORT_OPDW_OUTPATIENTS o
LEFT JOIN SAILWMCCV.C19_COHORT_OPDW_OUTPATIENTS_DIAG d
ON o.prov_unit_cd = d.prov_unit_cd
AND o.case_rec_num_e = d.case_rec_num_e
AND o.att_id_e = d.att_id_e
AND o.attend_dt = d.attend_dt
JOIN (SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_TIA
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_TIA_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_AMI
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_AMI_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ANGINA
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_DIC
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ARTERY_DISSECT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ARTERY_DISSECT_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_CARDIOMYOPATHY
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_CARDIOMYOPATHY_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_DVT_DVT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_DVT_ICVT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_VT_CCU002
WHERE is_latest = 1
AND category <> 'VT_covariate_only'
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_HF
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_LIFE_ARRHYTHM
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_LIFE_ARRHYTHM_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_MESENTERIC_ANAEMIA
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_PE
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_PE_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_SCD
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_HS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_IS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_NOS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_SAH
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_ISCH_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_TCP
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_FRACTURE
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_MESENTERIC_THROMBUS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_MYOCARDITIS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_ARTERIAL_EMBOLISM_OTHR
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_PERICARDITIS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_STROKE_SAH_HS_CCU002
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_ICD10_THROMBOPHILIA
WHERE is_latest = 1
) d
ON CONCAT(diag_cd_123, diag_cd_4) = code OR diag_cd_123 = diag_cd_123
WHERE o.alf_e IN (SELECT DISTINCT alf_e FROM SAILWMCCV.C19_COHORT20)
AND year(o.attend_dt) =< 2021
ORDER BY o.alf_e, o.attend_dt;
SELECT diag_cd, count(*) FROM SAILWWMCCV.PHEN_OPDW_CVD
GROUP BY diag_cd;
-- ***********************************************************************************************
-- Create a table containing all CVD outcomes in primary care (WLGP, GPCD) data for C20 cohort
-- ***********************************************************************************************
CREATE TABLE SAILWWMCCV.PHEN_WLGP_CVD (
alf_e bigint,
wob date,
gndr_cd char(1),
prac_cd_e bigint,
record_order int,
event_dt date,
event_cd char(40),
event_val decimal(31,8),
outcome_readcode char(5),
outcome_name char(20),
outcome_term char(255),
outcome_category char(40)
)
DISTRIBUTE BY HASH(alf_e);
-- DROP TABLE SAILWWMCCV.PHEN_WLGP_CVD;
TRUNCATE TABLE SAILWWMCCV.PHEN_WLGP_CVD IMMEDIATE;
INSERT INTO SAILWWMCCV.PHEN_WLGP_CVD (alf_e, wob, gndr_cd, prac_cd_e, record_order, event_dt, event_cd,
event_val, outcome_readcode, outcome_name, outcome_term, outcome_category)
SELECT alf_e,
wob,
gndr_cd,
prac_cd_e,
ROW_NUMBER() OVER(PARTITION BY alf_e ORDER BY event_dt) AS record_order,
event_dt,
event_cd,
event_val,
code AS outcome_readcode,
name AS outcome_name,
desc AS outcome_term,
LEFT(category, 40) AS outcome_category
FROM SAILWWMCCV.WMCC_WLGP_GP_EVENT_CLEANSED
JOIN (SELECT * FROM SAILWWMCCV.PHEN_READ_AMI
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_ARTERY_DISSECT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_SCD
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_STROKE_HS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_STROKE_SAH
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_STROKE_IS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_CARDIOMYOPATHY
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_HF
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_LIMB_AMPUTATION
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_PE
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_STROKE_NOS
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_STROKE_TIA
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_DVT_DVT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_DVT_ICVT
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_ANGINA
WHERE is_latest = 1
UNION ALL
SELECT * FROM SAILWWMCCV.PHEN_READ_STROKE_ISCH_CCU002
WHERE is_latest = 1
)
ON event_cd = code
WHERE alf_e IN (SELECT DISTINCT alf_e FROM SAILWMCCV.C19_COHORT20)
AND year(event_dt) =< 2021
ORDER BY alf_e, event_dt;
|
<reponame>InsightsDev-dev/tajo
create table nation_multifile (
n_nationkey int,
n_name text,
n_regionkey int,
n_comment text); |
insert into T_TEST (NAME) values ('Keith');
insert into T_TEST (NAME) values ('Dave');
select NAME from T_TEST where NAME = 'Keith';
|
<reponame>patrickfischer1/WebAPI
-- 720 Number of drug exposure records by drug start month
--insert into @results_schema.heracles_results (cohort_definition_id, analysis_id, stratum_1, count_value)
select c1.cohort_definition_id,
720 as analysis_id,
YEAR(drug_exposure_start_date)*100 + month(drug_exposure_start_date) as stratum_1,
cast( '' as varchar(1) ) as stratum_2, cast( '' as varchar(1) ) as stratum_3, cast( '' as varchar(1) ) as stratum_4,
COUNT_BIG(distinct de1.drug_exposure_id) as count_value
into #results_720
from
@CDM_schema.drug_exposure de1
inner join #HERACLES_cohort c1
on de1.person_id = c1.subject_id
--{@drug_concept_ids != '' | @cohort_period_only == 'true'}?{
WHERE
--{@cohort_period_only == 'true'}?{
de1.drug_exposure_start_date>=c1.cohort_start_date and de1.drug_exposure_start_date<=c1.cohort_end_date
--}
--{@drug_concept_ids != '' & @cohort_period_only == 'true'}?{
AND
--}
--{@drug_concept_ids != ''}?{
de1.drug_concept_id in (@drug_concept_ids)
--}
--}
group by c1.cohort_definition_id,
YEAR(drug_exposure_start_date)*100 + month(drug_exposure_start_date)
; |
\timing on
begin;
create extension if not exists pggraphblas;
drop table if exists article;
create table article (
id serial,
code text,
label text
);
drop table if exists page_link;
create table page_link (
id serial,
subject text,
object text
);
drop table if exists article_x_article;
create table article_x_article (
source integer,
dest integer
);
copy article (code, label) from program 'bzcat /demo/dbpedia/dump/labels_wkd_uris_en.ttl.bz2 | gawk ''FNR > 1 {match($1, /<http:\/\/wikidata.dbpedia.org\/resource\/(.*)>/, a); $1 = ""; $2 = ""; match($0, /(\"[^\"]+\")/, b); print a[1]","b[1]}''' with (format csv);
copy page_link (subject, object) from program 'bzcat /demo/dbpedia/dump/page_links_wkd_uris_en.ttl.bz2 | gawk ''FNR > 1 {match($1, /<http:\/\/wikidata.dbpedia.org\/resource\/(.*)>/, a); match($3, /<http:\/\/wikidata.dbpedia.org\/resource\/(.*)>/, b); print a[1]","b[1]}''' with (format csv);
insert into article_x_article
select s.id, o.id
from page_link l
join article s on (l.subject = s.code)
join article o on (l.object = o.code)
where o.code is not null and s.code is not null;
create index on article_x_article (source) include (dest);
\ir functions.sql
commit;
|
<gh_stars>10-100
INSERT INTO "RoomMode" (name, description) VALUES
('BREAKOUT', 'Users may participate in the general video chat.'),
('PRERECORDED', 'Pre-recorded content should be played out to attendees. The breakout and Q&A video chats may also be available to relevant users.'),
('PRESENTATION', 'A live presentation should be delivered in the Q&A video chat. The breakout video chat may also be available to relevant users.'),
('Q_AND_A', 'A live Q&A/discussion should be delivered in the Q&A video chat. The breakout video chat may also be available to relevant users.');
|
SELECT
e1.name AS Employee
FROM
Employee AS e1
INNER JOIN Employee AS e2
ON e1.managerid = e2.id
WHERE
e1.salary > e2.salary
;
|
CREATE TABLE sys.module_assembly_usages
(
object_id int NOT NULL,
assembly_id int NOT NULL
); |
CREATE TABLE public."payment" (
id serial NOT NULL,
client_id varchar NOT NULL,
order_id varchar NOT NULL,
payment_plan varchar NOT NULL,
created_on timestamp(0) NOT NULL DEFAULT now(),
PRIMARY KEY (id)
); |
INSERT INTO `cities` (`id`, `name`, `state_id`) VALUES
(45778, 'Streetsboro', 3959),
(45779, 'Strongsville', 3959),
(45780, 'Struthers', 3959),
(45781, 'Sylvania', 3959),
(45782, 'Tallmadge', 3959),
(45783, 'Tiffin', 3959),
(45784, 'Toledo', 3959),
(45785, 'Trotwood', 3959),
(45786, 'Troy', 3959),
(45787, 'Twinsburg', 3959),
(45788, 'University Heights', 3959),
(45789, 'Upper Arlington', 3959),
(45790, 'Urbana', 3959),
(45791, '<NAME>', 3959),
(45792, '<NAME>', 3959),
(45793, 'Vandalia', 3959),
(45794, 'Vermilion', 3959),
(45795, 'Wadsworth', 3959),
(45796, 'Warren', 3959),
(45797, 'Warrensville Heights', 3959),
(45798, 'Washington', 3959),
(45799, 'Waverly', 3959),
(45800, 'West Carrollton City', 3959),
(45801, 'West Chester', 3959),
(45802, 'Westerville', 3959),
(45803, 'Westlake', 3959),
(45804, '<NAME>', 3959),
(45805, 'Whitehall', 3959),
(45806, 'Wickliffe', 3959),
(45807, 'Willoughby', 3959),
(45808, 'Willowick', 3959),
(45809, 'Wilmington', 3959),
(45810, 'Winesburg', 3959),
(45811, 'Wooster', 3959),
(45812, 'Worthington', 3959),
(45813, 'Xenia', 3959),
(45814, '<NAME>', 3959),
(45815, 'Youngstown', 3959),
(45816, 'Zanesville', 3959),
(45817, 'Ada', 3960),
(45818, 'Altus', 3960),
(45819, 'Ardmore', 3960),
(45820, 'Bartlesville', 3960),
(45821, 'Bethany', 3960),
(45822, 'Bixby', 3960),
(45823, '<NAME>', 3960),
(45824, 'Catoosa', 3960),
(45825, 'Chickasha', 3960),
(45826, 'Choctaw', 3960),
(45827, 'Claremore', 3960),
(45828, 'Del City', 3960),
(45829, 'Duncan', 3960),
(45830, 'Durant', 3960),
(45831, 'Edmond', 3960),
(45832, '<NAME>', 3960),
(45833, 'Elk City', 3960),
(45834, 'Enid', 3960),
(45835, '<NAME>', 3960),
(45836, 'Grove', 3960),
(45837, 'Guthrie', 3960),
(45838, 'Heavener', 3960),
(45839, 'Hugo', 3960),
(45840, 'Lawton', 3960),
(45841, 'Lindsay', 3960),
(45842, 'MacAlester', 3960),
(45843, 'Miami', 3960),
(45844, 'Midwest City', 3960),
(45845, 'Moore', 3960),
(45846, 'Morrison', 3960),
(45847, 'Muskogee', 3960),
(45848, 'Mustang', 3960),
(45849, 'Norman', 3960),
(45850, 'Oklahoma City', 3960),
(45851, 'Okmulgee', 3960),
(45852, 'Owasso', 3960),
(45853, 'Pawnee', 3960),
(45854, 'Ponca City', 3960),
(45855, 'Rattan', 3960),
(45856, 'Sand Springs', 3960),
(45857, 'Sapulpa', 3960),
(45858, 'Shawnee', 3960),
(45859, 'Stillwater', 3960),
(45860, 'Sulphur', 3960),
(45861, 'Tahlequah', 3960),
(45862, 'The Village', 3960),
(45863, 'Tulsa', 3960),
(45864, 'Weatherford', 3960),
(45865, 'Welch', 3960),
(45866, 'Woodward', 3960),
(45867, 'Yukon', 3960),
(45868, '<NAME>', 3961),
(45869, 'Woodbridge', 3961),
(45870, 'Albany', 3962),
(45871, 'Aloha', 3962),
(45872, 'Altamont', 3962),
(45873, 'Arleta', 3962),
(45874, 'Ashland', 3962),
(45875, 'Astoria', 3962),
(45876, '<NAME>', 3962),
(45877, 'Beaverton', 3962),
(45878, 'Bend', 3962),
(45879, 'Canby', 3962),
(45880, '<NAME>', 3962),
(45881, '<NAME>', 3962),
(45882, '<NAME>', 3962),
(45883, 'Central Point', 3962),
(45884, 'City of The Dalles', 3962),
(45885, '<NAME>', 3962),
(45886, 'Corvallis', 3962),
(45887, 'Creswell', 3962),
(45888, 'Dallas', 3962),
(45889, 'Donald', 3962),
(45890, 'Eugene', 3962),
(45891, '<NAME>', 3962),
(45892, '<NAME>', 3962),
(45893, 'Gladstone', 3962),
(45894, 'Glide', 3962),
(45895, '<NAME>', 3962),
(45896, 'Gresham', 3962),
(45897, 'Hayesville', 3962),
(45898, 'Hazelwood', 3962),
(45899, 'Hermiston', 3962),
(45900, 'Hillsboro', 3962),
(45901, '<NAME>', 3962),
(45902, 'Hubbard', 3962),
(45903, '<NAME>', 3962),
(45904, '<NAME>', 3962),
(45905, 'Keizer', 3962),
(45906, '<NAME>', 3962),
(45907, '<NAME>', 3962),
(45908, '<NAME>', 3962),
(45909, 'Lebanon', 3962),
(45910, 'Lincoln', 3962),
(45911, 'MacMinnville', 3962),
(45912, 'Medford', 3962),
(45913, 'Milwaukie', 3962),
(45914, 'Newberg', 3962),
(45915, 'Newport', 3962),
(45916, '<NAME>', 3962),
(45917, 'OBrien', 3962),
(45918, '<NAME>', 3962),
(45919, 'Oatfield', 3962),
(45920, 'Ontario', 3962),
(45921, 'Oregon City', 3962),
(45922, 'Pendleton', 3962),
(45923, 'Portland', 3962),
(45924, 'Redmond', 3962),
(45925, 'Riddle', 3962),
(45926, '<NAME>', 3962),
(45927, 'Roseburg', 3962),
(45928, 'Salem', 3962),
(45929, 'Sherwood', 3962),
(45930, 'Springfield', 3962),
(45931, 'Sublimity', 3962),
(45932, 'Sutherlin', 3962),
(45933, 'Talent', 3962),
(45934, 'Tigard', 3962),
(45935, 'Troutdale', 3962),
(45936, 'Tualatin', 3962),
(45937, 'Turner', 3962),
(45938, 'Vaughn', 3962),
(45939, '<NAME>', 3962),
(45940, 'Wilsonville', 3962),
(45941, 'Woodburn', 3962),
(45942, 'Akron', 3963),
(45943, 'Aliquippa', 3963),
(45944, 'Allentown', 3963),
(45945, 'Altoona', 3963),
(45946, 'Ambler', 3963),
(45947, 'Amityville', 3963),
(45948, 'Ardmore', 3963),
(45949, 'Audubon', 3963),
(45950, '<NAME>', 3963),
(45951, 'Baldwin', 3963),
(45952, 'Bangor', 3963),
(45953, '<NAME>', 3963),
(45954, '<NAME>', 3963),
(45955, 'Bensalem', 3963),
(45956, 'Berwick', 3963),
(45957, 'Berwyn', 3963),
(45958, '<NAME>', 3963),
(45959, 'Bethlehem', 3963),
(45960, 'Bloomsburg', 3963),
(45961, 'Boyertown', 3963),
(45962, 'Bradford', 3963),
(45963, 'Brentwood', 3963),
(45964, 'Bridgeport', 3963),
(45965, 'Bristol', 3963),
(45966, 'Brockway', 3963),
(45967, 'Broomall', 3963),
(45968, 'Bushkill', 3963),
(45969, 'Butler', 3963),
(45970, '<NAME>', 3963),
(45971, 'Canonsburg', 3963),
(45972, 'Carbondale', 3963),
(45973, 'Carlisle', 3963),
(45974, 'Carnegie', 3963),
(45975, '<NAME>', 3963),
(45976, 'Chambersburg', 3963),
(45977, 'Chester', 3963),
(45978, 'Che<NAME>ings', 3963),
(45979, '<NAME>', 3963),
(45980, 'Coatesville', 3963),
(45981, '<NAME>', 3963),
(45982, 'Columbia', 3963),
(45983, 'Conshohocken', 3963),
(45984, 'Coraopolis', 3963),
(45985, 'Corry', 3963),
(45986, '<NAME>', 3963),
(45987, 'Cresco', 3963),
(45988, 'Croydon', 3963),
(45989, 'Dallas', 3963),
(45990, 'Dallastown', 3963),
(45991, 'Darby', 3963),
(45992, '<NAME>', 3963),
(45993, 'Downingtown', 3963),
(45994, '<NAME>', 3963),
(45995, 'Duncansville', 3963),
(45996, 'Dunmore', 3963),
(45997, 'East Norriton', 3963),
(45998, 'East Stroudsburg', 3963),
(45999, 'Easton', 3963),
(46000, 'Economy', 3963),
(46001, 'Edinboro', 3963),
(46002, 'Elizabethtown', 3963),
(46003, '<NAME>', 3963),
(46004, 'Emmaus', 3963),
(46005, 'Ephrata', 3963),
(46006, 'Erdenheim', 3963),
(46007, 'Erie', 3963),
(46008, 'Erwinna', 3963),
(46009, 'Exton', 3963),
(46010, 'Feasterville', 3963),
(46011, 'Folcroft', 3963),
(46012, 'Franklin', 3963),
(46013, '<NAME>', 3963),
(46014, 'Frederick', 3963),
(46015, 'Fullerton', 3963),
(46016, 'Furlong', 3963),
(46017, 'Gettysburg', 3963),
(46018, 'Gibsonia', 3963),
(46019, 'Glenside', 3963),
(46020, 'Gordonville', 3963),
(46021, 'Greensburg', 3963),
(46022, 'Gwynedd', 3963),
(46023, 'Hampden Township', 3963),
(46024, 'Hanover', 3963),
(46025, 'Harleysville', 3963),
(46026, 'Harrisburg', 3963),
(46027, 'Harrison Township', 3963),
(46028, 'Hatboro', 3963),
(46029, 'Haverford', 3963),
(46030, 'Havertown', 3963),
(46031, 'Hazleton', 3963),
(46032, 'Hermitage', 3963),
(46033, 'Hershey', 3963),
(46034, 'Hollidaysburg', 3963),
(46035, 'Horsham', 3963),
(46036, '<NAME>', 3963),
(46037, 'Indiana', 3963),
(46038, 'Irvine', 3963),
(46039, 'Ivyland', 3963),
(46040, 'Jeannette', 3963),
(46041, 'Jefferson', 3963),
(46042, 'Jenkintown', 3963),
(46043, 'Johnstown', 3963),
(46044, 'Kempton', 3963),
(46045, '<NAME>', 3963),
(46046, '<NAME>', 3963),
(46047, 'Kingston', 3963),
(46048, 'Kutztown', 3963),
(46049, '<NAME>', 3963),
(46050, 'Lancaster', 3963),
(46051, 'Landenberg', 3963),
(46052, 'Langhorne', 3963),
(46053, 'Lansdale', 3963),
(46054, 'Lansdowne', 3963),
(46055, 'Lansford', 3963),
(46056, '<NAME>', 3963),
(46057, 'Lebanon', 3963),
(46058, 'Lehighton', 3963),
(46059, 'Levittown', 3963),
(46060, '<NAME>', 3963),
(46061, 'Linesville', 3963),
(46062, 'Linwood', 3963),
(46063, '<NAME>', 3963),
(46064, '<NAME>', 3963),
(46065, '<NAME>', 3963),
(46066, 'MacKeesport', 3963),
(46067, 'Malvern', 3963),
(46068, 'Meadville', 3963),
(46069, 'Mechanicsburg', 3963),
(46070, 'Media', 3963),
(46071, '<NAME>', 3963),
(46072, 'Middleburg', 3963),
(46073, 'Mifflinville', 3963),
(46074, 'Milanville', 3963),
(46075, 'Milford', 3963),
(46076, 'Millersburg', 3963),
(46077, 'Monessen', 3963),
(46078, 'Moscow', 3963),
(46079, '<NAME>', 3963),
(46080, '<NAME>', 3963),
(46081, 'Mountville', 3963),
(46082, 'Munhall', 3963),
(46083, 'Municipality of Monroeville', 3963),
(46084, 'Municipality of Murrysville', 3963),
(46085, '<NAME>', 3963),
(46086, 'Nanticoke', 3963),
(46087, 'Narberth', 3963),
(46088, '<NAME>', 3963),
(46089, 'Nazareth', 3963),
(46090, 'Nether Providence Township', 3963),
(46091, '<NAME>', 3963),
(46092, '<NAME>', 3963),
(46093, 'New Castle', 3963),
(46094, 'New Cumberland', 3963),
(46095, 'New Hope', 3963),
(46096, '<NAME>', 3963),
(46097, 'Newton', 3963),
(46098, 'Newtown', 3963),
(46099, 'Newville', 3963),
(46100, 'Norristown', 3963),
(46101, 'North East', 3963),
(46102, 'North Versailles', 3963),
(46103, 'North Wales', 3963),
(46104, 'Oaks', 3963),
(46105, 'O<NAME>', 3963),
(46106, 'Olyphant', 3963),
(46107, 'Orrtanna', 3963),
(46108, 'Orwigsburg', 3963),
(46109, 'Oxford', 3963),
(46110, 'Paoli', 3963),
(46111, 'Parksburg', 3963),
(46112, '<NAME>', 3963),
(46113, 'Philadelphia', 3963),
(46114, 'Phildelphia', 3963),
(46115, 'Phoenixville', 3963),
(46116, 'Pipersville', 3963),
(46117, 'Pittsburgh', 3963),
(46118, 'Pleasantville', 3963),
(46119, 'Plum', 3963),
(46120, '<NAME>', 3963),
(46121, 'Pottstown', 3963),
(46122, 'Pottsville', 3963),
(46123, 'Primos', 3963),
(46124, 'Progress', 3963),
(46125, 'Prospect', 3963),
(46126, 'Quakertown', 3963),
(46127, '<NAME>', 3963),
(46128, 'Reading', 3963),
(46129, '<NAME>', 3963),
(46130, 'Roseto', 3963),
(46131, '<NAME>', 3963),
(46132, 'Royersford', 3963),
(46133, '<NAME>', 3963),
(46134, 'Sarver', 3963),
(46135, 'Saxonburg', 3963),
(46136, '<NAME>', 3963),
(46137, 'Scranton', 3963),
(46138, 'Seward', 3963),
(46139, 'Sewickley', 3963),
(46140, '<NAME>ship', 3963),
(46141, 'Sharon', 3963),
(46142, '<NAME>', 3963),
(46143, 'Somerset', 3963),
(46144, 'Souderton', 3963),
(46145, 'South Park Township', 3963),
(46146, 'Southampton', 3963),
(46147, 'Springfield', 3963),
(46148, 'State College', 3963),
(46149, 'Strasburg', 3963),
(46150, 'Sunbury', 3963),
(46151, 'Susquehanna', 3963),
(46152, 'Swissvale', 3963),
(46153, 'Tamaqua', 3963),
(46154, 'Taylor', 3963),
(46155, 'Telford', 3963),
(46156, 'Trevose', 3963),
(46157, '<NAME>', 3963),
(46158, 'Tyrone', 3963),
(46159, 'Uniontown', 3963),
(46160, '<NAME>', 3963),
(46161, 'Upper Providence Township', 3963),
(46162, 'Upper Saint Clair', 3963),
(46163, 'Vanderbilt', 3963),
(46164, 'Warminster', 3963),
(46165, 'Warren', 3963),
(46166, 'Warrendale', 3963),
(46167, 'Washington', 3963),
(46168, 'Waterford', 3963),
(46169, 'Waverly', 3963),
(46170, 'Wayne', 3963),
(46171, 'Waynesboro', 3963),
(46172, 'West Chester', 3963),
(46173, 'West Mifflin', 3963),
(46174, 'West Norriton', 3963),
(46175, '<NAME>', 3963),
(46176, 'Wexford', 3963),
(46177, 'Whitehall', 3963),
(46178, 'Wilcox', 3963),
(46179, 'Wilkes-Barre', 3963),
(46180, 'Wilkinsburg', 3963),
(46181, 'Williamsport', 3963),
(46182, '<NAME>', 3963),
(46183, 'Womelsdorf', 3963),
(46184, 'Woodlyn', 3963),
(46185, 'Woolrich', 3963),
(46186, 'Wyncote', 3963),
(46187, 'Wyndmoor', 3963),
(46188, 'Wynnewood', 3963),
(46189, 'Yardley', 3963),
(46190, 'Yeadon', 3963),
(46191, 'York', 3963),
(46192, 'Ramey', 3964),
(46193, 'Adamsville', 3969),
(46194, 'Alcoa', 3969),
(46195, 'Antioch', 3969),
(46196, 'Arlington', 3969),
(46197, 'Athens', 3969),
(46198, 'Bartlett', 3969),
(46199, '<NAME>', 3969),
(46200, 'Bloomingdale', 3969),
(46201, 'Blountville', 3969),
(46202, 'Brentwood', 3969),
(46203, 'Bristol', 3969),
(46204, 'Brownsville', 3969),
(46205, 'Burns', 3969),
(46206, 'Chattanooga', 3969),
(46207, 'Clarksville', 3969),
(46208, 'Cleveland', 3969),
(46209, 'Collierville', 3969),
(46210, 'Columbia', 3969),
(46211, 'Cookeville', 3969),
(46212, 'Cornersville', 3969),
(46213, 'Crossville', 3969),
(46214, 'Dayton', 3969),
(46215, 'Dickson', 3969),
(46216, 'Dyersburg', 3969),
(46217, '<NAME>', 3969),
(46218, '<NAME>', 3969),
(46219, 'Elizabethton', 3969),
(46220, 'Farragut', 3969),
(46221, 'Franklin', 3969),
(46222, 'Gainesboro', 3969),
(46223, 'Gallatin', 3969),
(46224, 'Gatlinburg', 3969),
(46225, 'Germantown', 3969),
(46226, 'Goodlettsville', 3969),
(46227, 'Greeneville', 3969),
(46228, 'Hendersonville', 3969),
(46229, 'Hixson', 3969),
(46230, 'Jackson', 3969),
(46231, '<NAME>', 3969),
(46232, 'Kingsport', 3969),
(46233, 'Knoxville', 3969),
(46234, 'Kodak', 3969),
(46235, '<NAME>', 3969),
(46236, 'Lawrenceburg', 3969),
(46237, 'Lebanon', 3969),
(46238, '<NAME>', 3969),
(46239, 'Lewisburg', 3969),
(46240, 'MacMinnville', 3969),
(46241, 'Maryville', 3969),
(46242, 'Memphis', 3969),
(46243, '<NAME>alley', 3969),
(46244, 'Millington', 3969),
(46245, 'Morristown', 3969),
(46246, 'Mulberry', 3969),
(46247, 'Murfreesboro', 3969),
(46248, 'Nashville', 3969),
(46249, '<NAME>', 3969),
(46250, 'Ooltewah', 3969),
(46251, 'Pinson', 3969),
(46252, '<NAME>', 3969),
(46253, 'Selmer', 3969),
(46254, 'Sevierville', 3969),
(46255, 'Shelbyville', 3969),
(46256, 'Smithville', 3969),
(46257, 'Smyrna', 3969),
(46258, 'Spring City', 3969),
(46259, 'Springfield', 3969),
(46260, 'Tazewell', 3969),
(46261, 'Trenton', 3969),
(46262, 'Tullahoma', 3969),
(46263, 'Union City', 3969),
(46264, 'Abilene', 3970),
(46265, 'Addison', 3970),
(46266, 'Alamo', 3970),
(46267, 'Aldine', 3970),
(46268, 'Alice', 3970),
(46269, 'Allen', 3970),
(46270, 'Alvin', 3970),
(46271, 'Amarillo', 3970),
(46272, '<NAME>', 3970),
(46273, 'Andrews', 3970),
(46274, 'Angleton', 3970),
(46275, 'Argyle', 3970),
(46276, 'Arlington', 3970),
(46277, 'Aspermont', 3970),
(46278, 'Atascocita', 3970),
(46279, 'Athens', 3970),
(46280, 'Austin', 3970),
(46281, 'Austinn', 3970),
(46282, 'Azle', 3970),
(46283, '<NAME>', 3970),
(46284, 'Barry', 3970),
(46285, 'Bay City', 3970),
(46286, 'Baytown', 3970),
(46287, 'Beaumont', 3970),
(46288, 'Bedford', 3970),
(46289, 'Beeville', 3970),
(46290, 'Bellaire', 3970),
(46291, 'Belton', 3970),
(46292, 'Benbrook', 3970),
(46293, '<NAME>', 3970),
(46294, '<NAME>', 3970),
(46295, 'Boerne', 3970),
(46296, 'Borger', 3970),
(46297, 'Breckenridge', 3970),
(46298, 'Brenham', 3970),
(46299, 'Brownfield', 3970),
(46300, 'Brownsville', 3970),
(46301, 'Brownwood', 3970),
(46302, 'Bryan', 3970),
(46303, 'Buda', 3970),
(46304, 'Burkburnett', 3970),
(46305, 'Burleson', 3970),
(46306, 'Campbell', 3970),
(46307, 'Canyon', 3970),
(46308, '<NAME>', 3970),
(46309, 'Carrollton', 3970),
(46310, '<NAME>', 3970),
(46311, '<NAME>', 3970),
(46312, '<NAME>', 3970),
(46313, 'Celina', 3970),
(46314, 'Center', 3970),
(46315, 'Channelview', 3970),
(46316, 'City of Dallas', 3970),
(46317, 'Cleburne', 3970),
(46318, 'Cloverleaf', 3970),
(46319, 'Clute', 3970),
(46320, 'College Station', 3970),
(46321, 'Colleyville', 3970),
(46322, 'Columbus', 3970),
(46323, 'Comanche', 3970),
(46324, 'Conroe', 3970),
(46325, 'Converse', 3970),
(46326, 'Coppell', 3970),
(46327, '<NAME>', 3970),
(46328, 'Corinth', 3970),
(46329, '<NAME>', 3970),
(46330, 'Corsicana', 3970),
(46331, 'Cotulla', 3970),
(46332, 'Crandall', 3970),
(46333, 'Cypress', 3970),
(46334, 'Dallas', 3970),
(46335, 'Dayton', 3970),
(46336, 'DeSoto', 3970),
(46337, '<NAME>', 3970),
(46338, '<NAME>', 3970),
(46339, 'Denison', 3970),
(46340, 'Denton', 3970),
(46341, 'Dickinson', 3970),
(46342, 'Donna', 3970),
(46343, 'Dumas', 3970),
(46344, 'Duncanville', 3970),
(46345, '<NAME>', 3970),
(46346, 'Edinburg', 3970),
(46347, '<NAME>', 3970),
(46348, '<NAME>', 3970),
(46349, 'Elmendorf', 3970),
(46350, 'Ennis', 3970),
(46351, 'Euless', 3970),
(46352, 'Fairfield', 3970),
(46353, '<NAME>', 3970),
(46354, '<NAME>', 3970),
(46355, '<NAME>', 3970),
(46356, 'Forney', 3970),
(46357, '<NAME>', 3970),
(46358, '<NAME>', 3970),
(46359, '<NAME>', 3970),
(46360, 'Freeport', 3970),
(46361, 'Friendswood', 3970),
(46362, 'Frisco', 3970),
(46363, 'Gainesville', 3970),
(46364, '<NAME>', 3970),
(46365, 'Galveston', 3970),
(46366, 'Garland', 3970),
(46367, 'Gatesville', 3970),
(46368, 'Georgetown', 3970),
(46369, '<NAME>', 3970),
(46370, 'Grandview', 3970),
(46371, 'Grapeland', 3970),
(46372, 'Grapevine', 3970),
(46373, 'Greenville', 3970),
(46374, 'Gregory', 3970),
(46375, 'Groves', 3970),
(46376, '<NAME>', 3970),
(46377, '<NAME>', 3970),
(46378, 'Harlingen', 3970),
(46379, 'Henderson', 3970),
(46380, 'Hereford', 3970),
(46381, 'Hewitt', 3970),
(46382, 'Highland Village', 3970),
(46383, 'Hillsboro', 3970),
(46384, 'Houston', 3970),
(46385, 'Humble', 3970),
(46386, 'Huntsville', 3970),
(46387, 'Hurst', 3970),
(46388, 'Ingleside', 3970),
(46389, 'Irving', 3970),
(46390, 'Jacksonville', 3970),
(46391, 'Jefferson', 3970),
(46392, 'Jollyville', 3970),
(46393, 'Justin', 3970),
(46394, 'Katy', 3970),
(46395, 'Kaufman', 3970),
(46396, 'Keller', 3970),
(46397, 'Kemah', 3970),
(46398, 'Kemp', 3970),
(46399, 'Kerrville', 3970),
(46400, 'Kilgore', 3970),
(46401, 'Killeen', 3970),
(46402, 'Kingsville', 3970),
(46403, 'Kingwood', 3970),
(46404, '<NAME>', 3970),
(46405, '<NAME>', 3970),
(46406, 'Lackland Air Force Base', 3970),
(46407, '<NAME>', 3970),
(46408, '<NAME>', 3970),
(46409, 'Lamesa', 3970),
(46410, 'Lampasas', 3970),
(46411, 'Lancaster', 3970),
(46412, 'Laredo', 3970),
(46413, 'League City', 3970),
(46414, '<NAME>', 3970),
(46415, 'Levelland', 3970),
(46416, 'Lewisville', 3970),
(46417, '<NAME>', 3970),
(46418, 'Lindsay', 3970),
(46419, '<NAME>', 3970),
(46420, '<NAME>', 3970),
(46421, 'Llano', 3970),
(46422, 'Lockhart', 3970),
(46423, 'Longview', 3970),
(46424, 'Lubbock', 3970),
(46425, 'Lufkin', 3970),
(46426, 'Lumberton', 3970),
(46427, 'MacAllen', 3970),
(46428, 'MacKinney', 3970),
(46429, 'Magnolia', 3970),
(46430, 'Malakoff', 3970),
(46431, 'Mansfield', 3970),
(46432, 'Marshall', 3970),
(46433, 'McAllen', 3970),
(46434, 'McKinney', 3970),
(46435, 'Medina', 3970),
(46436, 'Mercedes', 3970),
(46437, 'Mesquite', 3970),
(46438, 'Midland', 3970),
(46439, '<NAME>', 3970),
(46440, 'Mission', 3970),
(46441, 'Mission Bend', 3970),
(46442, 'Missouri City', 3970),
(46443, 'Montgomery', 3970),
(46444, '<NAME>', 3970),
(46445, 'Murphy', 3970),
(46446, 'Nacogdoches', 3970),
(46447, 'Nederland', 3970),
(46448, '<NAME>', 3970),
(46449, '<NAME>', 3970),
(46450, '<NAME>', 3970),
(46451, '<NAME>', 3970),
(46452, 'Odessa', 3970),
(46453, 'Orange', 3970),
(46454, 'Ovalo', 3970),
(46455, 'Palestine', 3970),
(46456, 'Pampa', 3970),
(46457, 'Paris', 3970),
(46458, 'Pasadena', 3970),
(46459, 'Pearland', 3970),
(46460, '<NAME>', 3970),
(46461, 'Pecos', 3970),
(46462, 'Pflugerville', 3970),
(46463, 'Pharr', 3970),
(46464, 'Pinehurst', 3970),
(46465, 'Plainview', 3970),
(46466, 'Plano', 3970),
(46467, 'Pontotoc', 3970),
(46468, '<NAME>', 3970),
(46469, '<NAME>', 3970),
(46470, '<NAME>', 3970),
(46471, 'Portland', 3970),
(46472, 'Pottsboro', 3970),
(46473, 'Princeton', 3970),
(46474, 'Richardson', 3970),
(46475, 'Richmond', 3970),
(46476, 'Rio Grande City', 3970),
(46477, 'Robstown', 3970),
(46478, 'Rockport', 3970),
(46479, 'Rockwall', 3970),
(46480, 'Roma', 3970),
(46481, 'Rosenberg', 3970),
(46482, '<NAME>', 3970),
(46483, 'Rowlett', 3970),
(46484, 'Royse City', 3970),
(46485, 'Sachse', 3970),
(46486, 'Saginaw', 3970),
(46487, '<NAME>', 3970),
(46488, '<NAME>', 3970),
(46489, '<NAME>', 3970),
(46490, '<NAME>', 3970),
(46491, '<NAME>', 3970),
(46492, '<NAME>', 3970),
(46493, 'Schertz', 3970),
(46494, 'Seabrook', 3970),
(46495, 'Seagoville', 3970),
(46496, 'Seguin', 3970),
(46497, 'Sherman', 3970),
(46498, 'Slaton', 3970),
(46499, 'Smithville', 3970),
(46500, 'Snyder', 3970),
(46501, 'Socorro', 3970),
(46502, 'South Houston', 3970),
(46503, 'South Padre Island', 3970),
(46504, 'Southlake', 3970),
(46505, 'Spring', 3970),
(46506, 'Stafford', 3970),
(46507, 'Stephenville', 3970),
(46508, 'Strawn', 3970),
(46509, 'S<NAME>', 3970),
(46510, '<NAME>', 3970),
(46511, 'Sweetwater', 3970),
(46512, 'Taylor', 3970),
(46513, 'Temple', 3970),
(46514, 'Terrell', 3970),
(46515, 'Texarkana', 3970),
(46516, 'Texas City', 3970),
(46517, 'The Colony', 3970),
(46518, 'The Woodlands', 3970),
(46519, 'Tomball', 3970),
(46520, 'Tyler', 3970),
(46521, 'Universal City', 3970),
(46522, 'University Park', 3970),
(46523, 'Uvalde', 3970),
(46524, 'Vernon', 3970),
(46525, 'Victoria', 3970),
(46526, 'Vidor', 3970),
(46527, 'Waco', 3970),
(46528, 'Watauga', 3970),
(46529, 'Waxahachie', 3970),
(46530, 'Weatherford', 3970),
(46531, 'Weslaco', 3970),
(46532, 'West Odessa', 3970),
(46533, 'West University Place', 3970),
(46534, 'White Settlement', 3970),
(46535, '<NAME>', 3970),
(46536, 'Winnsboro', 3970),
(46537, 'Woodway', 3970),
(46538, 'Wylie', 3970),
(46539, 'Yoakum', 3970),
(46540, 'austinn', 3970),
(46541, '<NAME>', 3971),
(46542, 'Alpine', 3972),
(46543, 'American Fork', 3972),
(46544, 'Bluffdale', 3972),
(46545, 'Bountiful', 3972),
(46546, 'Brigham City', 3972),
(46547, '<NAME>', 3972),
(46548, '<NAME>', 3972),
(46549, 'Cedar City', 3972),
(46550, 'Centerville', 3972),
(46551, 'Clearfield', 3972),
(46552, 'Clinton', 3972),
(46553, 'Cottonwood Heights', 3972),
(46554, 'Cottonwood West', 3972),
(46555, 'Draper', 3972),
(46556, 'East Millcreek', 3972),
(46557, 'Farmington', 3972),
(46558, 'Holladay-Cottonwood', 3972),
(46559, 'Ivins', 3972),
(46560, 'Kaysville', 3972),
(46561, 'Kearns', 3972),
(46562, 'Layton', 3972),
(46563, 'Lehi', 3972),
(46564, 'Logan', 3972),
(46565, 'Magna', 3972),
(46566, 'Mapleton', 3972),
(46567, 'Midvale', 3972),
(46568, 'Millcreek', 3972),
(46569, 'Moab', 3972),
(46570, 'Monticello', 3972),
(46571, 'Murray', 3972),
(46572, '<NAME>', 3972),
(46573, '<NAME>', 3972),
(46574, 'Ogden', 3972),
(46575, 'Orem', 3972),
(46576, 'Panguitch', 3972),
(46577, 'Park City', 3972),
(46578, 'Payson', 3972),
(46579, '<NAME>', 3972),
(46580, 'Provo', 3972),
(46581, 'Riverton', 3972),
(46582, 'Roy', 3972),
(46583, '<NAME>', 3972),
(46584, 'Salt Lake City', 3972),
(46585, 'Sandy', 3972),
(46586, 'Santaquin', 3972),
(46587, 'South Jordan', 3972),
(46588, 'South Ogden', 3972),
(46589, 'South Salt Lake', 3972),
(46590, 'Spanish Fork', 3972),
(46591, 'Springville', 3972),
(46592, 'Taylorsville', 3972),
(46593, 'Tooele', 3972),
(46594, 'Tremonton', 3972),
(46595, 'Union', 3972),
(46596, 'Washington', 3972),
(46597, 'West Jordan', 3972),
(46598, 'West Valley City', 3972),
(46599, 'Woods Cross', 3972),
(46600, 'Barre', 3973),
(46601, 'Bennington', 3973),
(46602, 'Brattleboro', 3973),
(46603, 'Bristol', 3973),
(46604, 'Burlington', 3973),
(46605, 'Cabot', 3973),
(46606, 'Colchester', 3973),
(46607, 'Danville', 3973),
(46608, 'Dorset', 3973),
(46609, 'Dummerston', 3973),
(46610, '<NAME>', 3973),
(46611, 'East Fairfield', 3973),
(46612, '<NAME>', 3973),
(46613, 'Essex', 3973),
(46614, '<NAME>', 3973),
(46615, '<NAME>', 3973),
(46616, 'Hartford', 3973),
(46617, 'Jericho', 3973),
(46618, 'Manchester', 3973),
(46619, 'Manchester Center', 3973),
(46620, 'Middlebury', 3973),
(46621, 'Milton', 3973),
(46622, 'Montpelier', 3973),
(46623, 'Putney', 3973),
(46624, 'Randolph', 3973),
(46625, 'Rochester', 3973),
(46626, 'Rutland', 3973),
(46627, '<NAME>', 3973),
(46628, '<NAME>', 3973),
(46629, '<NAME>', 3973),
(46630, '<NAME>', 3973),
(46631, 'South Strafford', 3973),
(46632, 'Springfield', 3973),
(46633, 'Townshend', 3973),
(46634, 'Tunbridge', 3973),
(46635, 'Van', 3973),
(46636, 'Vernon', 3973),
(46637, 'Wallingford', 3973),
(46638, 'Watisfield', 3973),
(46639, '<NAME>field', 3973),
(46640, '<NAME>leston', 3973),
(46641, 'West Newbury', 3973),
(46642, 'Williston', 3973),
(46643, 'Winooski', 3973),
(46644, 'Abingdon', 3974),
(46645, 'Alexandria', 3974),
(46646, 'Annandale', 3974),
(46647, 'Arlington', 3974),
(46648, 'Ashburn', 3974),
(46649, 'Ashland', 3974),
(46650, 'Aylett', 3974),
(46651, 'Bailey''<NAME>', 3974),
(46652, 'Blacksburg', 3974),
(46653, 'Bland', 3974),
(46654, 'Bluefield', 3974),
(46655, '<NAME>', 3974),
(46656, 'Bristol', 3974),
(46657, 'Burke', 3974),
(46658, '<NAME>', 3974),
(46659, 'Centreville', 3974),
(46660, 'Chantilly', 3974),
(46661, 'Charlottesville', 3974),
(46662, 'Chesapeake', 3974),
(46663, 'Chester', 3974),
(46664, 'Christiansburg', 3974),
(46665, 'Churchville', 3974),
(46666, 'Clifton', 3974),
(46667, 'Colonial Heights', 3974),
(46668, 'Culloden', 3974),
(46669, 'D<NAME>', 3974),
(46670, 'Danville', 3974),
(46671, 'Dublin', 3974),
(46672, '<NAME>', 3974),
(46673, 'East Highland Park', 3974),
(46674, 'Faber', 3974),
(46675, 'Fairfax', 3974),
(46676, '<NAME>', 3974),
(46677, 'Fishersville', 3974),
(46678, '<NAME>', 3974),
(46679, '<NAME>', 3974),
(46680, 'Franconia', 3974),
(46681, 'Franklin', 3974),
(46682, 'Fredericksburg', 3974),
(46683, 'Front Royal', 3974),
(46684, 'Gainesville', 3974),
(46685, '<NAME>', 3974),
(46686, 'Gloucester', 3974),
(46687, 'Goochland', 3974),
(46688, '<NAME>', 3974),
(46689, 'Groveton', 3974),
(46690, 'Hampton', 3974),
(46691, 'Harrisonburg', 3974),
(46692, 'Henrico', 3974),
(46693, 'Herndon', 3974),
(46694, 'Highland Springs', 3974),
(46695, 'Hollins', 3974),
(46696, 'Hopewell', 3974),
(46697, '<NAME>', 3974),
(46698, 'Idylwood', 3974),
(46699, 'Irvington', 3974),
(46700, 'Jamesville', 3974),
(46701, 'Jefferson', 3974),
(46702, '<NAME>', 3974),
(46703, 'Keswick', 3974),
(46704, '<NAME>', 3974),
(46705, 'Lakeside', 3974),
(46706, 'Laurel', 3974),
(46707, 'Leesburg', 3974),
(46708, 'Lincolnia', 3974),
(46709, 'Lorton', 3974),
(46710, 'Lynchburg', 3974),
(46711, 'MacLean', 3974),
(46712, 'Madison', 3974),
(46713, '<NAME>', 3974),
(46714, 'Manassas', 3974),
(46715, 'Marion', 3974),
(46716, 'Martinsville', 3974),
(46717, 'Mclean', 3974),
(46718, 'Mechanicsville', 3974),
(46719, 'Melfa', 3974),
(46720, 'Midlothian', 3974),
(46721, 'Montclair', 3974),
(46722, 'Montross', 3974),
(46723, '<NAME>', 3974),
(46724, 'Newington', 3974),
(46725, 'Newport News', 3974),
(46726, 'Norfolk', 3974),
(46727, '<NAME>', 3974),
(46728, 'Oakton', 3974),
(46729, 'Orange', 3974),
(46730, 'Petersburg', 3974),
(46731, 'Poquoson', 3974),
(46732, 'Portsmouth', 3974),
(46733, 'Radford', 3974),
(46734, 'Reston', 3974),
(46735, 'Richmond', 3974),
(46736, 'Roanoke', 3974),
(46737, '<NAME>', 3974),
(46738, 'Salem', 3974),
(46739, 'Seaford', 3974),
(46740, '<NAME>', 3974),
(46741, 'Springfield', 3974),
(46742, 'Stafford', 3974),
(46743, 'Staffordshire', 3974),
(46744, 'Staunton', 3974),
(46745, 'Sterling', 3974),
(46746, 'Suffolk', 3974),
(46747, '<NAME>', 3974),
(46748, 'Tappahannock', 3974),
(46749, 'Timberlake', 3974),
(46750, 'Triangle', 3974),
(46751, 'Tuckahoe', 3974),
(46752, '<NAME>', 3974),
(46753, 'Vienna', 3974),
(46754, '<NAME>', 3974),
(46755, 'Warrenton', 3974),
(46756, 'Washington', 3974),
(46757, 'Waterford', 3974),
(46758, 'Waynesboro', 3974),
(46759, '<NAME>', 3974),
(46760, 'Williamsburg', 3974),
(46761, 'Winchester', 3974),
(46762, '<NAME>', 3974),
(46763, 'Woodbridge', 3974),
(46764, 'Wytheville', 3974),
(46765, 'Yorktown', 3974),
(46766, 'Aberdeen', 3975),
(46767, 'Airway Heights', 3975),
(46768, '<NAME>', 3975),
(46769, 'Anacortes', 3975),
(46770, 'Arlington', 3975),
(46771, 'Auburn', 3975),
(46772, '<NAME>', 3975),
(46773, 'Battle Ground', 3975),
(46774, 'Bellevue', 3975),
(46775, 'Bellingham', 3975),
(46776, 'Bingen', 3975),
(46777, 'Blaine', 3975),
(46778, 'Bothell', 3975),
(46779, 'Bremerton', 3975),
(46780, '<NAME>', 3975),
(46781, 'Buckley', 3975),
(46782, 'Burien', 3975),
(46783, 'Burlington', 3975),
(46784, '<NAME>', 3975),
(46785, 'Camas', 3975),
(46786, 'Cascade-Fairwood', 3975),
(46787, 'Centralia', 3975),
(46788, 'Chehalis', 3975),
(46789, 'Cheney', 3975),
(46790, 'Clear Lake', 3975),
(46791, 'Colbert', 3975),
(46792, 'Cottage Lake', 3975),
(46793, 'Covington-Sawyer-Wilderness', 3975),
(46794, '<NAME>', 3975),
(46795, 'Duvall', 3975),
(46796, 'East Hill-Meridian', 3975),
(46797, 'East Renton Highlands', 3975),
(46798, 'East Wenatchee Bench', 3975),
(46799, 'Eastsound', 3975),
(46800, 'Eatonville', 3975),
(46801, 'Edgewood-North Hill', 3975),
(46802, 'Edmonds', 3975),
(46803, '<NAME>', 3975),
(46804, 'Ellensburg', 3975),
(46805, 'Enumclaw', 3975),
(46806, 'Esperance', 3975),
(46807, 'Everett', 3975),
(46808, 'Evergreen', 3975),
(46809, 'Fairchild', 3975),
(46810, '<NAME>', 3975),
(46811, 'Ferndale', 3975),
(46812, 'Fircrest', 3975),
(46813, 'Ford', 3975),
(46814, '<NAME>', 3975),
(46815, '<NAME>', 3975),
(46816, '<NAME>', 3975),
(46817, 'Graham', 3975),
(46818, '<NAME>', 3975),
(46819, 'Inglewood-<NAME>', 3975),
(46820, 'Issaquah', 3975),
(46821, 'Kelso', 3975),
(46822, 'Kenmore', 3975),
(46823, 'Kennewick', 3975),
(46824, 'Kent', 3975),
(46825, 'Kingsgate', 3975),
(46826, 'Kirkland', 3975),
(46827, 'Lacey', 3975),
(46828, '<NAME>-<NAME>', 3975),
(46829, 'Lakeland North', 3975),
(46830, 'Lakeland South', 3975),
(46831, 'Lakewood', 3975),
(46832, 'Longview', 3975),
(46833, 'Lynnwood', 3975),
(46834, '<NAME>', 3975),
(46835, 'Marysville', 3975),
(46836, '<NAME>', 3975),
(46837, 'Minnehaha', 3975),
(46838, 'Monroe', 3975),
(46839, '<NAME>', 3975),
(46840, 'Mossyrock', 3975),
(46841, '<NAME>', 3975),
(46842, '<NAME>', 3975),
(46843, 'Mukilteo', 3975),
(46844, 'Newport Hills', 3975),
(46845, 'North City-Ridgecrest', 3975),
(46846, 'North Creek', 3975),
(46847, 'North Marysville', 3975),
(46848, 'Oak Harbor', 3975),
(46849, 'Ocean Shores', 3975),
(46850, 'Olympia', 3975),
(46851, 'Opportunity', 3975),
(46852, 'Orchards South', 3975),
(46853, 'Orting', 3975),
(46854, '<NAME>-<NAME>', 3975),
(46855, 'Parkland', 3975),
(46856, 'Pasco', 3975),
(46857, 'Picnic Point-North Lynnwood', 3975),
(46858, 'Pine Lake', 3975),
(46859, 'Port Angeles', 3975),
(46860, '<NAME>', 3975),
(46861, '<NAME>', 3975),
(46862, 'Port Orchard', 3975),
(46863, 'Poulsbo', 3975),
(46864, 'Pullman', 3975),
(46865, 'Puyallup', 3975),
(46866, 'Redmond', 3975),
(46867, 'Renton', 3975),
(46868, 'Republic', 3975),
(46869, 'Richland', 3975),
(46870, '<NAME>', 3975),
(46871, 'Sahalee', 3975),
(46872, '<NAME>', 3975),
(46873, 'Sammamish', 3975),
(46874, 'SeaTac', 3975),
(46875, 'Seattle', 3975),
(46876, 'Seattle Hill-Silver Firs', 3975),
(46877, '<NAME>', 3975),
(46878, 'Shelton', 3975),
(46879, 'Shoreline', 3975),
(46880, 'Silverdale', 3975),
(46881, 'Snohomish', 3975),
(46882, 'South Hill', 3975),
(46883, '<NAME>', 3975),
(46884, 'South Seattle', 3975),
(46885, 'Spanaway', 3975),
(46886, 'Spokane', 3975),
(46887, 'Sumas', 3975),
(46888, 'Sumner', 3975),
(46889, 'Sunnyside', 3975),
(46890, 'Tacoma', 3975),
(46891, 'Tukwila', 3975),
(46892, 'Tumwater', 3975),
(46893, 'University Place', 3975),
(46894, 'Vancouver', 3975),
(46895, 'Vashon', 3975),
(46896, '<NAME>', 3975),
(46897, 'Washougal', 3975),
(46898, 'Wenatchee', 3975),
(46899, '<NAME>', 3975),
(46900, '<NAME>', 3975),
(46901, '<NAME>', 3975),
(46902, '<NAME>', 3975),
(46903, 'Woodinville', 3975),
(46904, 'Yakima', 3975),
(46905, 'Yelm', 3975),
(46906, 'Adams', 3977),
(46907, 'Allouez', 3977),
(46908, 'Appleton', 3977),
(46909, 'Ashland', 3977),
(46910, 'Ashwaubenon', 3977),
(46911, 'Baraboo', 3977),
(46912, '<NAME>', 3977),
(46913, 'Beloit', 3977),
(46914, 'Brookfield', 3977),
(46915, '<NAME>', 3977),
(46916, 'Burlington', 3977),
(46917, 'Caledonia', 3977),
(46918, 'Carter', 3977),
(46919, 'Cedarburg', 3977),
(46920, '<NAME>', 3977),
(46921, 'Cudahy', 3977),
(46922, '<NAME>', 3977),
(46923, '<NAME>', 3977),
(46924, 'Delafield', 3977),
(46925, '<NAME>', 3977),
(46926, 'Elkhorn', 3977),
(46927, 'Elroy', 3977),
(46928, 'Fitchburg', 3977),
(46929, '<NAME>', 3977),
(46930, '<NAME>', 3977),
(46931, 'Franklin', 3977),
(46932, 'Galesville', 3977),
(46933, 'Germantown', 3977),
(46934, '<NAME>', 3977),
(46935, 'Glendale', 3977),
(46936, 'Goodman', 3977),
(46937, 'Grafton', 3977),
(46938, '<NAME>', 3977),
(46939, 'Greendale', 3977),
(46940, 'Greenfield', 3977),
(46941, 'Hartford', 3977),
(46942, 'Hartland', 3977),
(46943, 'Howard', 3977),
(46944, 'Hudson', 3977),
(46945, 'Janesville', 3977),
(46946, 'Jefferson', 3977),
(46947, 'Junction City', 3977),
(46948, 'Kaukauna', 3977),
(46949, 'Kenosha', 3977),
(46950, 'Kiel', 3977),
(46951, 'Kohler', 3977),
(46952, '<NAME>', 3977),
(46953, '<NAME>', 3977),
(46954, 'Madison', 3977),
(46955, 'Manitowoc', 3977),
(46956, 'Marinette', 3977),
(46957, 'Marshfield', 3977),
(46958, 'Medford', 3977),
(46959, 'Menasha', 3977),
(46960, '<NAME>', 3977),
(46961, 'Menomonie', 3977),
(46962, 'Mequon', 3977),
(46963, 'Merrill', 3977),
(46964, 'Middleton', 3977),
(46965, 'Milwaukee', 3977),
(46966, 'Mineral Point', 3977),
(46967, 'Monroe', 3977),
(46968, '<NAME>', 3977),
(46969, 'Mukwonago', 3977),
(46970, 'Muskego', 3977),
(46971, 'Neenah', 3977),
(46972, '<NAME>', 3977),
(46973, '<NAME>', 3977),
(46974, '<NAME>', 3977),
(46975, 'Oconomowoc', 3977),
(46976, 'Onalaska', 3977),
(46977, 'Orfordville', 3977),
(46978, 'Oshkosh', 3977),
(46979, '<NAME>', 3977),
(46980, 'Platteville', 3977),
(46981, '<NAME>', 3977),
(46982, 'Plover', 3977),
(46983, '<NAME>', 3977),
(46984, 'Portage', 3977),
(46985, 'Pound', 3977),
(46986, 'Racine', 3977),
(46987, 'Reedsburg', 3977),
(46988, 'Rhinelander', 3977),
(46989, '<NAME>', 3977),
(46990, '<NAME>', 3977),
(46991, 'Sheboygan', 3977),
(46992, 'Shorewood', 3977),
(46993, '<NAME>', 3977),
(46994, '<NAME>', 3977),
(46995, '<NAME>', 3977),
(46996, 'Stoughton', 3977),
(46997, 'Strum', 3977),
(46998, 'Sturtevant', 3977),
(46999, '<NAME>', 3977),
(47000, 'Superior', 3977),
(47001, '<NAME>', 3977),
(47002, 'Tomah', 3977),
(47003, 'Two Rivers', 3977),
(47004, 'Washington Island', 3977),
(47005, 'Waterford', 3977),
(47006, 'Watertown', 3977),
(47007, 'Waukesha', 3977),
(47008, 'Waupun', 3977),
(47009, 'Wausau', 3977),
(47010, 'Wautoma', 3977),
(47011, 'Wauwatosa', 3977),
(47012, '<NAME>is', 3977),
(47013, '<NAME>', 3977),
(47014, 'Weston', 3977),
(47015, '<NAME>', 3977),
(47016, 'Whitewater', 3977),
(47017, '<NAME>', 3977),
(47018, 'Buffalo', 3978),
(47019, 'Casper', 3978),
(47020, 'Cheyenne', 3978),
(47021, 'Cody', 3978),
(47022, 'Douglas', 3978),
(47023, 'Evanston', 3978),
(47024, 'Gillette', 3978),
(47025, '<NAME>', 3978),
(47026, 'Jackson', 3978),
(47027, 'Lander', 3978),
(47028, 'Laramie', 3978),
(47029, 'Powell', 3978),
(47030, 'Rawlins', 3978),
(47031, 'Riverton', 3978),
(47032, '<NAME>', 3978),
(47033, 'Sheridan', 3978),
(47034, 'Torrington', 3978),
(47035, 'Worland', 3978),
(47036, 'Artigas', 3980),
(47037, 'Bella Union', 3980),
(47038, '<NAME>', 3981),
(47039, 'Canelones', 3981),
(47040, 'Ciudad de la Costa', 3981),
(47041, '<NAME>', 3981),
(47042, '<NAME>', 3981),
(47043, 'Pando', 3981),
(47044, '<NAME>', 3981),
(47045, 'Progreso', 3981),
(47046, '<NAME>', 3981),
(47047, 'Carmelo', 3983),
(47048, 'Colonia', 3983),
(47049, '<NAME>', 3983),
(47050, '<NAME>', 3983),
(47051, 'Durazno', 3984),
(47052, 'Florida', 3985),
(47053, 'Trinidad', 3986),
(47054, 'Minas', 3987),
(47055, 'Maldonado', 3988),
(47056, '<NAME>', 3988),
(47057, '<NAME>', 3989),
(47058, 'Montevideo', 3989),
(47059, 'Paysandu', 3990),
(47060, 'Rivera', 3992),
(47061, 'Chuy', 3993),
(47062, 'Rocha', 3993),
(47063, 'Salto', 3994),
(47064, 'Dolores', 3996),
(47065, 'Mercedes', 3996),
(47066, '<NAME>', 3997),
(47067, 'Tacuarembo', 3997),
(47068, 'Ahunabayev', 3999),
(47069, 'Andijon', 3999),
(47070, 'Asaka', 3999),
(47071, 'Boz', 3999),
(47072, 'Hakkulobod', 3999),
(47073, 'Hocaobod', 3999),
(47074, 'Honobod', 3999),
(47075, 'Ilyichevsk', 3999),
(47076, 'Karabagis', 3999),
(47077, 'Kurgontepa', 3999),
(47078, 'Marhomat', 3999),
(47079, 'Pahtaobod', 3999),
(47080, 'Paytug', 3999),
(47081, 'Sahrihan', 3999),
(47082, 'Buhoro', 4000),
(47083, 'Cangeldi', 4000),
(47084, 'Galaosiye', 4000),
(47085, 'Gazli', 4000),
(47086, 'Gijduvon', 4000),
(47087, 'Kizilravbe', 4000),
(47088, 'Kogon', 4000),
(47089, 'Korakul', 4000),
(47090, 'Korovulbazar', 4000),
(47091, 'Kukca', 4000),
(47092, 'Olot', 4000),
(47093, 'Oyokkuduk', 4000),
(47094, 'Romitan', 4000),
(47095, 'Safirkon', 4000),
(47096, 'Vobkent', 4000),
(47097, 'Cizah', 4002),
(47098, 'Dustlik', 4002),
(47099, 'Gagarin', 4002),
(47100, 'Gallaorol', 4002),
(47101, 'Marcanbulok', 4002),
(47102, 'Pahtakor', 4002),
(47103, 'Ulyanovo', 4002),
(47104, 'Zomin', 4002),
(47105, 'Altyarik', 4003),
(47106, 'Avval', 4003),
(47107, 'Besarik', 4003),
(47108, 'Fargona', 4003),
(47109, 'Hamza', 4003),
(47110, 'Kirgili', 4003),
(47111, 'Kukon', 4003),
(47112, 'Kuva', 4003),
(47113, 'Kuvasoy', 4003),
(47114, 'Margilon', 4003),
(47115, 'Rapkan', 4003),
(47116, 'Riston', 4003),
(47117, 'Toslok', 4003),
(47118, 'Yaypan', 4003),
(47119, 'Drujba', 4004),
(47120, 'Gurlan', 4004),
(47121, 'Hazorasp', 4004),
(47122, 'Heva', 4004),
(47123, 'Honko', 4004),
(47124, 'Kuskupir', 4004),
(47125, 'Mesekli', 4004),
(47126, 'Sovot', 4004),
(47127, 'Turpokkala', 4004),
(47128, 'Urgenc', 4004),
(47129, 'Beskent', 4005),
(47130, 'Ceynau', 4005),
(47131, 'Cirakci', 4005),
(47132, 'Dehkanobod', 4005),
(47133, 'Dinau', 4005),
(47134, 'Guzor', 4005),
(47135, 'Kallig', 4005),
(47136, 'Kamasi', 4005),
(47137, 'Karabag', 4005),
(47138, 'Karsi', 4005),
(47139, 'Kasbi', 4005),
(47140, 'Kitob', 4005),
(47141, 'Koson', 4005),
(47142, 'Madaniyat', 4005),
(47143, 'Maydayap', 4005),
(47144, 'Maymanak', 4005),
(47145, 'Muborak', 4005),
(47146, 'Oktyabrskiy', 4005),
(47147, 'Sahrisabz', 4005),
(47148, 'Talimarcon', 4005),
(47149, 'Urtacim', 4005),
(47150, 'Yakkabog', 4005),
(47151, 'Yaninison', 4005),
(47152, 'Beruni', 4006),
(47153, 'Buston', 4006),
(47154, 'Cimboy', 4006),
(47155, 'Halkobod', 4006),
(47156, 'Hucayli', 4006),
(47157, 'Karauzyak', 4006),
(47158, 'Kegayli', 4006),
(47159, 'Kizketken', 4006),
(47160, 'Kozokdaryo', 4006),
(47161, 'Kungirot', 4006),
(47162, 'Mangit', 4006),
(47163, 'Muynok', 4006),
(47164, 'Nukus', 4006),
(47165, 'Tahiatos', 4006),
(47166, 'Tahtakupir', 4006),
(47167, 'Turtkul', 4006),
(47168, 'Aytim', 4007),
(47169, 'Besbulok', 4007),
(47170, 'Cartak', 4007),
(47171, 'Cingeldi', 4007),
(47172, 'Cust', 4007),
(47173, 'Gozgon', 4007),
(47174, 'Iskavat', 4007),
(47175, 'Kalkuduk', 4007),
(47176, 'Konimeh', 4007),
(47177, 'Kosonsoy', 4007),
(47178, 'Minbulok', 4007),
(47179, 'Namangan', 4007),
(47180, 'Nurota', 4007),
(47181, 'Pop', 4007),
(47182, 'Tomdibulok', 4007),
(47183, 'Tosbulok', 4007),
(47184, 'Turakurgon', 4007),
(47185, 'Uckurgon', 4007),
(47186, 'Unhoyat', 4007),
(47187, 'Uyci', 4007),
(47188, 'Uzunkuduk', 4007),
(47189, 'Yanikurgon', 4007),
(47190, 'Karmana', 4008),
(47191, 'Kiziltepa', 4008),
(47192, 'Navoi', 4008),
(47193, 'Uckuduk', 4008),
(47194, 'Zarafson', 4008),
(47195, 'Bulungur', 4009),
(47196, 'Camboy', 4009),
(47197, 'Carhin', 4009),
(47198, 'Celak', 4009),
(47199, 'Cuma', 4009),
(47200, 'Dahbed', 4009),
(47201, 'Istihon', 4009),
(47202, 'Kattakurgon', 4009),
(47203, 'Kusrobod', 4009),
(47204, 'Nurobod', 4009),
(47205, 'Oktos', 4009),
(47206, 'Paysanba', 4009),
(47207, 'Samarkand', 4009),
(47208, 'Superfosfatniy', 4009),
(47209, 'Urgut', 4009),
(47210, 'Yanirobod', 4009),
(47211, 'Ziadin', 4009),
(47212, 'Baht', 4010),
(47213, 'Guliston', 4010),
(47214, 'Hovos', 4010),
(47215, 'Sirdare', 4010),
(47216, 'Sirin', 4010),
(47217, 'Yaniyer', 4010),
(47218, 'Akkurgon', 4011),
(47219, 'Boysun', 4011),
(47220, 'Carkurgon', 4011),
(47221, 'Denau', 4011),
(47222, 'Kumkurgon', 4011),
(47223, 'Paskurd', 4011),
(47224, 'Sargun', 4011),
(47225, 'Sariasiya', 4011),
(47226, 'Serobod', 4011),
(47227, 'Surci', 4011),
(47228, 'Termiz', 4011),
(47229, 'Zan', 4011),
(47230, 'Almazar', 4012),
(47231, 'Angren', 4012),
(47232, 'Bekobod', 4012),
(47233, 'Bektemir', 4012),
(47234, 'Buka', 4012),
(47235, 'Cinoz', 4012),
(47236, 'Circik', 4012),
(47237, 'Gazalkent', 4012),
(47238, 'Iskandar', 4012),
(47239, 'Keles', 4012),
(47240, 'Kibray', 4012),
(47241, 'Krasnogorskiy', 4012),
(47242, 'Kuyluk', 4012),
(47243, 'Ohangaron', 4012),
(47244, 'Olmalik', 4012),
(47245, 'Parkent', 4012),
(47246, 'Pskent', 4012),
(47247, 'Salar', 4012),
(47248, 'Soldatski', 4012),
(47249, 'Tashkent', 4012),
(47250, 'Toskent', 4012),
(47251, 'Tuytepa', 4012),
(47252, 'Urtaaul', 4012),
(47253, 'Yaniobod', 4012),
(47254, 'Yaniyul', 4012),
(47255, 'Lakatoro', 4013),
(47256, 'Norsup', 4013),
(47257, 'Longana', 4014),
(47258, 'Luganville', 4015),
(47259, '<NAME>', 4015),
(47260, 'Vila', 4016),
(47261, 'Isangel', 4017),
(47262, 'Sola', 4018),
(47263, '<NAME>', 4020),
(47264, 'Anaco', 4021),
(47265, 'Barcelona', 4021),
(47266, 'Cantaura', 4021),
(47267, '<NAME>', 4021),
(47268, '<NAME>', 4021),
(47269, '<NAME>', 4021),
(47270, 'Guasdualito', 4022),
(47271, '<NAME>', 4022),
(47272, 'Cagua', 4023),
(47273, '<NAME>', 4023),
(47274, '<NAME>', 4023),
(47275, '<NAME>', 4023),
(47276, 'Maracay', 4023),
(47277, '<NAME>', 4023),
(47278, '<NAME>', 4023),
(47279, 'Turmero', 4023),
(47280, '<NAME>', 4023),
(47281, 'Barinas', 4024),
(47282, 'Barinitas', 4024),
(47283, 'Ciudad Bolivar', 4025),
(47284, 'Ciudad Guayana', 4025),
(47285, 'Upata', 4025),
(47286, 'Goaigoaza', 4026),
(47287, 'Guacara', 4026),
(47288, 'Guigue', 4026),
(47289, 'Mariara', 4026),
(47290, 'Moron', 4026),
(47291, '<NAME>', 4026),
(47292, '<NAME>', 4026),
(47293, 'Tacarigua', 4026),
(47294, 'Valencia', 4026),
(47295, '<NAME>', 4027),
(47296, 'Tinaquillo', 4027),
(47297, 'Coro', 4030),
(47298, '<NAME>', 4030),
(47299, '<NAME>', 4030),
(47300, '<NAME>', 4031),
(47301, 'Calabozo', 4031),
(47302, '<NAME>', 4031),
(47303, '<NAME>', 4031),
(47304, 'Zaraza', 4031),
(47305, 'Barquisimeto', 4032),
(47306, 'Cabudare', 4032),
(47307, 'Carora', 4032),
(47308, '<NAME>', 4032),
(47309, '<NAME>', 4032),
(47310, 'Quibor', 4032),
(47311, 'Ejido', 4033),
(47312, '<NAME>', 4033),
(47313, 'Merida', 4033),
(47314, 'Baruta', 4034),
(47315, 'Carrizal', 4034),
(47316, '<NAME>', 4034),
(47317, 'Caucaguita', 4034),
(47318, 'Chacao', 4034),
(47319, 'Charallave', 4034),
(47320, 'Cua', 4034),
(47321, '<NAME>', 4034),
(47322, '<NAME>', 4034),
(47323, '<NAME>', 4034),
(47324, 'Guarenas', 4034),
(47325, 'Guatire', 4034),
(47326, '<NAME>', 4034),
(47327, '<NAME>', 4034),
(47328, '<NAME>', 4034),
(47329, '<NAME>', 4034),
(47330, 'Petare', 4034),
(47331, '<NAME>', 4034),
(47332, '<NAME>', 4034),
(47333, 'Maturin', 4035),
(47334, 'Acarigua', 4037),
(47335, 'Araure', 4037),
(47336, 'Guanare', 4037),
(47337, '<NAME>', 4037),
(47338, 'Carupano', 4038),
(47339, 'Cumana', 4038),
(47340, '<NAME>', 4039),
(47341, 'Rubio', 4039),
(47342, '<NAME>', 4039),
(47343, '<NAME>', 4039),
(47344, '<NAME>', 4039),
(47345, 'Tariba', 4039),
(47346, 'Trujillo', 4040),
(47347, 'Valera', 4040),
(47348, 'Caraballeda', 4041),
(47349, '<NAME>', 4041),
(47350, 'Maiquetia', 4041),
(47351, 'Chivacoa', 4042),
(47352, 'Nirgua', 4042),
(47353, '<NAME>', 4042),
(47354, 'Yaritagua', 4042),
(47355, 'Bachaquero', 4043),
(47356, 'Cabimas', 4043),
(47357, '<NAME>', 4043),
(47358, 'Lagunillas', 4043),
(47359, 'Machiques', 4043),
(47360, 'Maracaibo', 4043),
(47361, '<NAME>', 4043),
(47362, '<NAME>', 4043),
(47363, '<NAME>', 4043),
(47364, '<NAME>', 4053),
(47365, '<NAME>', 4053),
(47366, '<NAME>', 4053),
(47367, 'Settlement', 4064),
(47368, 'East End-Long Look', 4066),
(47369, 'Road Town', 4066),
(47370, 'West End', 4066),
(47371, 'Kolia', 4070),
(47372, 'Mala''e', 4070),
(47373, 'Ono', 4070),
(47374, 'Poi', 4070),
(47375, 'Tamana', 4070),
(47376, 'Taoa', 4070),
(47377, 'Tuatafa', 4070),
(47378, 'Vele', 4070),
(47379, 'Fiua', 4071),
(47380, 'Leava', 4071),
(47381, 'Nuku', 4071),
(47382, 'Tavai', 4071),
(47383, 'Toloke', 4071),
(47384, 'Vaisei', 4071),
(47385, 'Ahoa', 4072),
(47386, '<NAME>', 4072),
(47387, 'Alele', 4072),
(47388, 'Falaleu', 4072),
(47389, 'Gahi', 4072),
(47390, 'Haafuasia', 4072),
(47391, 'Haatofo', 4072),
(47392, 'Halalo', 4072),
(47393, 'Kolopopo', 4072),
(47394, 'Lavegahau', 4072),
(47395, 'Liku', 4072),
(47396, 'Mala''e', 4072),
(47397, 'Malaefoou', 4072),
(47398, 'Mata''Utu', 4072),
(47399, 'Teesi', 4072),
(47400, 'Tepa', 4072),
(47401, 'Utuofa', 4072),
(47402, 'Vailala', 4072),
(47403, 'Vaimalau', 4072),
(47404, 'Vaitupu', 4072),
(47405, 'ad-Dakhlah', 4074),
(47406, 'al-''Ayun', 4075),
(47407, 'as-Samarah', 4076),
(47408, '''Adan', 4077),
(47409, 'Aden', 4077),
(47410, 'Ahwar', 4078),
(47411, 'Ja''ar', 4078),
(47412, 'Zinjibar', 4078),
(47413, 'Dhamar', 4079),
(47414, 'Shaqra''', 4080),
(47415, 'al-Mukalla', 4080),
(47416, 'ash-Shahir', 4080),
(47417, 'Hajjah', 4081),
(47418, 'Hodaidah', 4082),
(47419, '<NAME>', 4083),
(47420, 'Ibb', 4083),
(47421, 'Jiblah', 4083),
(47422, 'Qa''tabah', 4083),
(47423, 'Yarim', 4083),
(47424, 'Tuban', 4084),
(47425, 'Ma''rib', 4085),
(47426, 'Sa''dah', 4087),
(47427, '''Amran', 4088),
(47428, 'Sahar', 4088),
(47429, 'Sanaa', 4088),
(47430, 'Sayyan', 4088),
(47431, '''Ataq', 4089),
(47432, 'Habban', 4089),
(47433, 'Taiz', 4089),
(47434, 'Ta''izz', 4090),
(47435, 'al-Mukha', 4090),
(47436, 'Raydah', 4091),
(47437, 'al-Bayda', 4091),
(47438, 'Bajil', 4092),
(47439, 'Bayt-al-Faqih', 4092),
(47440, 'Zabid', 4092),
(47441, 'al-Hudaydah', 4092),
(47442, 'al-Marawi''ah', 4092),
(47443, 'az-Zaydiyah', 4092),
(47444, 'al-Hazm', 4093),
(47445, 'al-Ghaydah', 4094),
(47446, 'Mahwit', 4095),
(47447, 'Nikshic', 4098),
(47448, 'Pljevlja', 4098),
(47449, 'Podgorica', 4098),
(47450, 'Ulcinj', 4098),
(47451, 'Gjakove', 4100),
(47452, '<NAME>', 4100),
(47453, 'Senta', 4100),
(47454, 'Serbia', 4100),
(47455, 'Uzice', 4100),
(47456, 'Ada', 4101),
(47457, 'Alibunar', 4101),
(47458, 'Apatin', 4101),
(47459, 'Bach', 4101),
(47460, '<NAME>', 4101),
(47461, '<NAME>', 4101),
(47462, '<NAME>', 4101),
(47463, '<NAME>', 4101),
(47464, '<NAME>', 4101),
(47465, 'Bechej', 4101),
(47466, '<NAME>', 4101),
(47467, 'Beochin', 4101),
(47468, 'Choka', 4101),
(47469, 'Churug', 4101),
(47470, 'Crvenka', 4101),
(47471, 'Futog', 4101),
(47472, 'Indhija', 4101),
(47473, 'Irig', 4101),
(47474, 'Kac', 4101),
(47475, 'Kanjizha', 4101),
(47476, 'Kikinda', 4101),
(47477, 'Kovachica', 4101),
(47478, 'Kovin', 4101),
(47479, 'Kula', 4101),
(47480, 'Mol', 4101),
(47481, '<NAME>', 4101),
(47482, '<NAME>', 4101),
(47483, '<NAME>', 4101),
(47484, '<NAME>', 4101),
(47485, 'Odzhaci', 4101),
(47486, 'Pacarak', 4101),
(47487, 'Palic', 4101),
(47488, 'Panchevo', 4101),
(47489, 'Petrovaradin', 4101),
(47490, 'Ruma', 4101),
(47491, 'Senta', 4101),
(47492, 'Shid', 4101),
(47493, 'Sivac', 4101),
(47494, 'Sombor', 4101),
(47495, 'Srbobran', 4101),
(47496, '<NAME>', 4101),
(47497, '<NAME>', 4101),
(47498, '<NAME>', 4101),
(47499, '<NAME>', 4101),
(47500, 'Subotica', 4101),
(47501, 'Temerin', 4101),
(47502, 'Veternik', 4101),
(47503, 'Vrbas', 4101),
(47504, 'Vrshac', 4101),
(47505, 'Zhabalj', 4101),
(47506, 'Zhitishte', 4101),
(47507, 'Zrenjanin', 4101),
(47508, 'Kabwe', 4102),
(47509, '<NAME>', 4102),
(47510, 'Mkushi', 4102),
(47511, 'Mumbwa', 4102),
(47512, 'Serenje', 4102),
(47513, 'Chambishi', 4103),
(47514, 'Chililabombwe', 4103),
(47515, 'Chingola', 4103),
(47516, 'Kalulushi', 4103),
(47517, 'Kitwe', 4103),
(47518, 'Luanshya', 4103),
(47519, 'Mpongwe', 4103),
(47520, 'Mufulira', 4103),
(47521, 'Ndola', 4103),
(47522, 'Chipata', 4104),
(47523, 'Katete', 4104),
(47524, 'Lundazi', 4104),
(47525, 'Petauke', 4104),
(47526, 'Mansa', 4105),
(47527, 'Mwansabombwe', 4105),
(47528, 'Nchelenge', 4105),
(47529, 'Samfya', 4105),
(47530, 'Chilanga', 4106),
(47531, 'Kafue', 4106),
(47532, 'Lusaka', 4106),
(47533, 'Kalengwa', 4107),
(47534, 'Kansanshi', 4107),
(47535, 'Mwinilunga', 4107),
(47536, 'Solwezi', 4107),
(47537, 'Zambezi', 4107),
(47538, 'Chinsali', 4108),
(47539, 'Isoka', 4108),
(47540, 'Kasama', 4108),
(47541, 'Mbala', 4108),
(47542, 'Mpika', 4108),
(47543, 'Choma', 4109),
(47544, 'Itezhi-Tezhi', 4109),
(47545, 'Kalomo', 4109),
(47546, 'Livingstone', 4109),
(47547, 'Maamba', 4109),
(47548, 'Mazabuka', 4109),
(47549, 'Monze', 4109),
(47550, 'Nakambala', 4109),
(47551, 'Siavonga', 4109),
(47552, 'Kalabo', 4110),
(47553, 'Kaoma', 4110),
(47554, 'Limulunga', 4110),
(47555, 'Mongu', 4110),
(47556, 'Senanga', 4110),
(47557, 'Sesheke', 4110),
(47558, 'Bulawayo', 4111),
(47559, 'Chitungwiza', 4112),
(47560, 'Harare', 4112),
(47561, 'Chimanimani', 4113),
(47562, 'Chipinge', 4113),
(47563, 'Mutare', 4113),
(47564, 'Nyanga', 4113),
(47565, 'Rusape', 4113),
(47566, 'Sakubva', 4113),
(47567, 'Chiredzi', 4117),
(47568, 'Gaths', 4117),
(47569, 'Masvingo', 4117),
(47570, 'Chivhu', 4120),
(47571, 'Gweru', 4120),
(47572, 'Kwekwe', 4120),
(47573, 'Mvuma', 4120),
(47574, 'Redcliffe', 4120),
(47575, 'Shurugwi', 4120),
(47576, 'Zvishavane', 4120); |
<filename>mysql-startscripts/dump.sql
-- MySQL dump 10.13 Distrib 8.0.26, for Linux (x86_64)
--
-- Host: localhost Database: db_moodtracker
-- ------------------------------------------------------
-- Server version 8.0.26
/*!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 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `hibernate_sequence`
--
DROP TABLE IF EXISTS `hibernate_sequence`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `hibernate_sequence` (
`next_val` bigint DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `hibernate_sequence`
--
LOCK TABLES `hibernate_sequence` WRITE;
/*!40000 ALTER TABLE `hibernate_sequence` DISABLE KEYS */;
INSERT INTO `hibernate_sequence` VALUES (13);
/*!40000 ALTER TABLE `hibernate_sequence` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `mood_entry`
--
DROP TABLE IF EXISTS `mood_entry`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mood_entry` (
`id` bigint NOT NULL,
`creation_time` date DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`mood` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `mood_entry`
--
LOCK TABLES `mood_entry` WRITE;
/*!40000 ALTER TABLE `mood_entry` DISABLE KEYS */;
/*!40000 ALTER TABLE `mood_entry` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `mood_entry_tags`
--
DROP TABLE IF EXISTS `mood_entry_tags`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mood_entry_tags` (
`mood_entry_id` bigint NOT NULL,
`tags_id` bigint NOT NULL,
PRIMARY KEY (`mood_entry_id`,`tags_id`),
KEY `FK50ysnjobt5bb5pey147gaqgxd` (`tags_id`),
CONSTRAINT `FK50ysnjobt5bb5pey147gaqgxd` FOREIGN KEY (`tags_id`) REFERENCES `tag` (`id`),
CONSTRAINT `FKf78ilhr585moi8hfjj41v4yqi` FOREIGN KEY (`mood_entry_id`) REFERENCES `mood_entry` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `mood_entry_tags`
--
LOCK TABLES `mood_entry_tags` WRITE;
/*!40000 ALTER TABLE `mood_entry_tags` DISABLE KEYS */;
/*!40000 ALTER TABLE `mood_entry_tags` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tag`
--
DROP TABLE IF EXISTS `tag`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tag` (
`id` bigint NOT NULL,
`keyword` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tag`
--
LOCK TABLES `tag` WRITE;
/*!40000 ALTER TABLE `tag` DISABLE KEYS */;
/*!40000 ALTER TABLE `tag` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user` (
`id` bigint NOT NULL,
`email` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`username` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_ob8kqyqqgmefl0aco34akdtpe` (`email`),
UNIQUE KEY `UK_sb8bbouer5wak8vyiiy4pf2bx` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2021-08-05 12:47:39
|
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 17, 2020 at 03:19 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
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: `mealshare/4`
--
-- --------------------------------------------------------
--
-- Table structure for table `meal`
--
CREATE TABLE `meal` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`startTime` datetime NOT NULL,
`endTime` datetime NOT NULL,
`price` float NOT NULL,
`image` varchar(255) NOT NULL,
`buyersid` int(11) DEFAULT NULL,
`makerid` varchar(255) NOT NULL,
`fcmtoken` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `meal`
--
INSERT INTO `meal` (`id`, `name`, `startTime`, `endTime`, `price`, `image`, `buyersid`, `makerid`, `fcmtoken`) VALUES
(1, 'W', '2020-04-09 16:00:00', '2020-04-09 19:00:00', 4.5, 'https://picsum.photos/510/300?random', 1, '1', ''),
(2, 'X', '2020-04-09 11:00:00', '2020-04-09 14:00:00', 2.5, 'https://picsum.photos/400/400?random', 1, '1', ''),
(3, 'Testmeal', '2020-04-18 06:00:00', '2020-04-18 08:00:00', 4.5, 'https://picsum.photos/510/300?random', 1, '1', ''),
(4, 'testing 2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 4.5, 'https://picsum.photos/510/300', NULL, 'd-75sAhQ1U-WDTA-FTGB7a:APA91bEKu2Q6rNbCqSTZgtTojC-hLPhqbeynIQqKbI5XETSdm4JmpAuaMzBGpZjDlKow5P-Sfw-lkZ_0sUocfjfrJPBTBPAHuf9PQxEsEZH-1GASbmC5dByil-3dpW-uk6pDudAgTPOH', ''),
(5, 'testing 3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 'https://picsum.photos/510/300', 1, '1', 'd-75sAhQ1U-WDTA-FTGB7a:APA91bEKu2Q6rNbCqSTZgtTojC-hLPhqbeynIQqKbI5XETSdm4JmpAuaMzBGpZjDlKow5P-Sfw-lkZ_0sUocfjfrJPBTBPAHuf9PQxEsEZH-1GASbmC5dByil-3dpW-uk6pDudAgTPOH'),
(6, 'testing 4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 'https://picsum.photos/510/300', 1, '1', 'd9q1PLc64ISqzOTykWXze2:APA91bEIK4kMidIVY25Cyj3EPMyS3nDTM-XZdeN-3BJDTK3GA6zQDK8-AC7FgtnW2NvH6OiN8c80AuE0Q0NnViO5hmFWG2NnvAj7nIOPR6_lmQ6BaRcB8kTFUHF69Xp9Io9YDsi-Xb1W'),
(7, 'dfsg', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 'https://picsum.photos/510/300', NULL, '1', 'd-75sAhQ1U-WDTA-FTGB7a:APA91bEKu2Q6rNbCqSTZgtTojC-hLPhqbeynIQqKbI5XETSdm4JmpAuaMzBGpZjDlKow5P-Sfw-lkZ_0sUocfjfrJPBTBPAHuf9PQxEsEZH-1GASbmC5dByil-3dpW-uk6pDudAgTPOH');
-- --------------------------------------------------------
--
-- Table structure for table `meal_tag`
--
CREATE TABLE `meal_tag` (
`id` int(11) NOT NULL,
`mealid` int(11) NOT NULL,
`tagid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `meal_tag`
--
INSERT INTO `meal_tag` (`id`, `mealid`, `tagid`) VALUES
(1, 1, 1),
(2, 1, 2),
(3, 2, 2);
-- --------------------------------------------------------
--
-- Table structure for table `review`
--
CREATE TABLE `review` (
`id` int(11) NOT NULL,
`mealid` int(11) NOT NULL,
`comment` varchar(255) DEFAULT NULL,
`rating` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `review`
--
INSERT INTO `review` (`id`, `mealid`, `comment`, `rating`) VALUES
(1, 1, '', 2),
(2, 1, NULL, 4),
(3, 2, NULL, 5);
-- --------------------------------------------------------
--
-- Table structure for table `tag`
--
CREATE TABLE `tag` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `tag`
--
INSERT INTO `tag` (`id`, `name`) VALUES
(1, 'A'),
(2, 'B');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`longitude` float NOT NULL,
`latitude` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `name`, `longitude`, `latitude`) VALUES
(1, 'A', 5, 51.4416);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `meal`
--
ALTER TABLE `meal`
ADD PRIMARY KEY (`id`),
ADD KEY `fk_meal_buyersid` (`buyersid`),
ADD KEY `fk_meal_makerid` (`makerid`);
--
-- Indexes for table `meal_tag`
--
ALTER TABLE `meal_tag`
ADD PRIMARY KEY (`id`),
ADD KEY `fk_meal_tag_mealid` (`mealid`),
ADD KEY `fk_meal_tag_tagid` (`tagid`);
--
-- Indexes for table `review`
--
ALTER TABLE `review`
ADD PRIMARY KEY (`id`),
ADD KEY `fk_review_mealid` (`mealid`);
--
-- Indexes for table `tag`
--
ALTER TABLE `tag`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `meal`
--
ALTER TABLE `meal`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `meal_tag`
--
ALTER TABLE `meal_tag`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `review`
--
ALTER TABLE `review`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `tag`
--
ALTER TABLE `tag`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `meal`
--
ALTER TABLE `meal`
ADD CONSTRAINT `fk_meal_buyersid` FOREIGN KEY (`buyersid`) REFERENCES `user` (`id`);
--
-- Constraints for table `meal_tag`
--
ALTER TABLE `meal_tag`
ADD CONSTRAINT `fk_meal_tag_mealid` FOREIGN KEY (`mealid`) REFERENCES `meal` (`id`),
ADD CONSTRAINT `fk_meal_tag_tagid` FOREIGN KEY (`tagid`) REFERENCES `tag` (`id`);
--
-- Constraints for table `review`
--
ALTER TABLE `review`
ADD CONSTRAINT `fk_review_mealid` FOREIGN KEY (`mealid`) REFERENCES `meal` (`id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<reponame>Alexnj1/department-tracker
DROP TABLE IF EXISTS employees;
DROP TABLE IF EXISTS roles;
DROP TABLE IF EXISTS departments;
CREATE TABLE departments (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
department_name VARCHAR(30) UNIQUE NOT NULL
);
CREATE TABLE roles (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(40) UNIQUE NOT NULL,
department_name VARCHAR(30),
salary DECIMAL NOT NULL,
CONSTRAINT fk_department FOREIGN KEY (department_name) REFERENCES departments(department_name) ON DELETE CASCADE
);
CREATE TABLE employees (
id INTEGER PRIMARY KEY,
first_name VARCHAR(20) NOT NULL,
last_name VARCHAR(20) NOT NULL,
role_name VARCHAR(40),
job_title VARCHAR(40) NOT NULL,
manager_id INTEGER REFERENCES employees(id),
CONSTRAINT fk_role FOREIGN KEY (role_name) REFERENCES roles(name) ON DELETE CASCADE
); |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 26, 2019 at 09:43 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
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: `lawin`
--
-- --------------------------------------------------------
--
-- Table structure for table `devices`
--
CREATE TABLE `devices` (
`id` int(11) NOT NULL,
`phone_no` varchar(255) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`date_updated` timestamp NULL DEFAULT NULL,
`date_created` timestamp NULL DEFAULT current_timestamp(),
`users_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `devices`
--
INSERT INTO `devices` (`id`, `phone_no`, `type`, `date_updated`, `date_created`, `users_id`) VALUES
(2, '09999', '0', NULL, '2019-10-26 03:40:21', 2);
-- --------------------------------------------------------
--
-- Table structure for table `reports`
--
CREATE TABLE `reports` (
`id` int(11) NOT NULL,
`lat` double DEFAULT NULL,
`lng` double DEFAULT NULL,
`date_created` timestamp NULL DEFAULT current_timestamp(),
`devices_id` int(11) NOT NULL,
`devices_users_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `reports`
--
INSERT INTO `reports` (`id`, `lat`, `lng`, `date_created`, `devices_id`, `devices_users_id`) VALUES
(4, 121.2323, 938493, '2019-10-26 04:56:04', 2, 2),
(5, 121.2323, 938493, '2019-10-26 04:56:07', 2, 2),
(6, 38974837, 2834728, '2019-10-26 04:56:25', 2, 2),
(7, 126.12323, 528.2324, '2019-10-26 04:58:57', 2, 2);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`fname` varchar(255) DEFAULT NULL,
`mname` varchar(255) DEFAULT NULL,
`lname` varchar(255) DEFAULT NULL,
`bdate` date DEFAULT NULL,
`gender` varchar(45) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`phone_no` varchar(255) DEFAULT NULL,
`emergency_no` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`image` varchar(255) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
`date_updated` timestamp NULL DEFAULT NULL,
`date_created` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `fname`, `mname`, `lname`, `bdate`, `gender`, `address`, `phone_no`, `emergency_no`, `email`, `username`, `password`, `image`, `type`, `status`, `date_updated`, `date_created`) VALUES
(2, 'aliah', '<PASSWORD>', 'casabuena', '2019-10-02', 'f', '345 lorem', '+6399999', '+6388888', 'aliah@', 'aliah', '<PASSWORD>', NULL, '0', NULL, NULL, '2019-10-26 03:39:44'),
(3, 'aaaaa', 'bbbb', 'cccc', '2019-10-26', 'f', '435 dfdsfss', '09282561378', '09222222222', '<EMAIL>', 'aliahaaa', '$2y$10$KAP50ES4cHYBl01iun0fjuN1Y4RjBVUiwqk6sHWTimZGvadEFZQEi', NULL, '0', 'activated', NULL, '2019-10-26 06:59:00');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `devices`
--
ALTER TABLE `devices`
ADD PRIMARY KEY (`id`,`users_id`),
ADD KEY `fk_devices_users_idx` (`users_id`);
--
-- Indexes for table `reports`
--
ALTER TABLE `reports`
ADD PRIMARY KEY (`id`,`devices_id`,`devices_users_id`),
ADD KEY `fk_reports_devices1_idx` (`devices_id`,`devices_users_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `userscol_UNIQUE` (`username`),
ADD UNIQUE KEY `email_UNIQUE` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `devices`
--
ALTER TABLE `devices`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `reports`
--
ALTER TABLE `reports`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `devices`
--
ALTER TABLE `devices`
ADD CONSTRAINT `fk_devices_users` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Constraints for table `reports`
--
ALTER TABLE `reports`
ADD CONSTRAINT `fk_reports_devices1` FOREIGN KEY (`devices_id`,`devices_users_id`) REFERENCES `devices` (`id`, `users_id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
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 */;
|
<reponame>kiritodeveloper/siscona<filename>sca 20170222 1934.sql
-- Script was generated by Devart dbForge Studio for MySQL, Version 172.16.31.10
-- Product home page: http://www.devart.com/dbforge/mysql/studio
-- Script date 22/02/2017 19:35:51
-- Server version: 5.5.5-10.1.8-MariaDB
-- Client version: 4.1
--
-- Definition for database sca
--
DROP DATABASE IF EXISTS sca;
CREATE DATABASE sca
CHARACTER SET latin1
COLLATE latin1_swedish_ci;
--
-- Disable foreign keys
--
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
--
-- Set character set the client will use to send SQL statements to the server
--
SET NAMES 'utf8';
--
-- Set default database
--
USE sca;
--
-- Definition for table migrations
--
CREATE TABLE migrations (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
migration VARCHAR(255) NOT NULL,
batch INT(11) NOT NULL,
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 4
AVG_ROW_LENGTH = 5461
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
--
-- Definition for table password_resets
--
CREATE TABLE password_resets (
email VARCHAR(255) NOT NULL,
token VARCHAR(255) NOT NULL,
created_at TIMESTAMP NULL DEFAULT NULL,
INDEX password_resets_email_index (email),
INDEX password_resets_token_index (token)
)
ENGINE = INNODB
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
--
-- Definition for table permissions
--
CREATE TABLE permissions (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
display_name VARCHAR(255) DEFAULT NULL,
description VARCHAR(255) DEFAULT NULL,
created_at TIMESTAMP NULL DEFAULT NULL,
updated_at TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE INDEX permissions_name_unique (name)
)
ENGINE = INNODB
AUTO_INCREMENT = 2
AVG_ROW_LENGTH = 16384
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
--
-- Definition for table roles
--
CREATE TABLE roles (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
display_name VARCHAR(255) DEFAULT NULL,
description VARCHAR(255) DEFAULT NULL,
created_at TIMESTAMP NULL DEFAULT NULL,
updated_at TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE INDEX roles_name_unique (name)
)
ENGINE = INNODB
AUTO_INCREMENT = 3
AVG_ROW_LENGTH = 8192
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
--
-- Definition for table users
--
CREATE TABLE users (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
remember_token VARCHAR(100) DEFAULT NULL,
created_at TIMESTAMP NULL DEFAULT NULL,
updated_at TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE INDEX users_email_unique (email)
)
ENGINE = INNODB
AUTO_INCREMENT = 3
AVG_ROW_LENGTH = 8192
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
--
-- Definition for table permission_role
--
CREATE TABLE permission_role (
permission_id INT(10) UNSIGNED NOT NULL,
role_id INT(10) UNSIGNED NOT NULL,
PRIMARY KEY (permission_id, role_id),
CONSTRAINT permission_role_permission_id_foreign FOREIGN KEY (permission_id)
REFERENCES permissions(id) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT permission_role_role_id_foreign FOREIGN KEY (role_id)
REFERENCES roles(id) ON DELETE CASCADE ON UPDATE CASCADE
)
ENGINE = INNODB
AVG_ROW_LENGTH = 16384
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
--
-- Definition for table role_user
--
CREATE TABLE role_user (
user_id INT(10) UNSIGNED NOT NULL,
role_id INT(10) UNSIGNED NOT NULL,
PRIMARY KEY (user_id, role_id),
CONSTRAINT role_user_role_id_foreign FOREIGN KEY (role_id)
REFERENCES roles(id) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT role_user_user_id_foreign FOREIGN KEY (user_id)
REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE
)
ENGINE = INNODB
AVG_ROW_LENGTH = 8192
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
--
-- Dumping data for table migrations
--
INSERT INTO migrations VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2017_02_22_201658_entrust_setup_tables', 1);
--
-- Dumping data for table password_resets
--
-- Table sca.password_resets does not contain any data (it is empty)
--
-- Dumping data for table permissions
--
INSERT INTO permissions VALUES
(1, 'permiso', 'permiso', 'permiso', '2017-02-22 20:48:53', '2017-02-22 20:48:53');
--
-- Dumping data for table roles
--
INSERT INTO roles VALUES
(1, 'admin', 'admin', NULL, NULL, NULL),
(2, 'analista', 'analista', 'descripcion', '2017-02-22 20:47:29', '2017-02-22 20:47:29');
--
-- Dumping data for table users
--
INSERT INTO users VALUES
(1, '<NAME>', '<EMAIL>', '$2y$10$7Ha53UK1VNxPOESwQ3EaVegp.1L3qUMDziejXBJbjP2QsOiGwZiRC', 'T2px4J5ifyCsQwMst6pnLHmasrZ7aMp92xhS9Dd1EUt1fVvhHh9JBfOj32DX', '2017-02-22 20:21:24', '2017-02-22 20:41:02'),
(2, 'jose', '<EMAIL>', <PASSWORD>.', NULL, '2017-02-22 20:48:01', '2017-02-22 20:48:36');
--
-- Dumping data for table permission_role
--
INSERT INTO permission_role VALUES
(1, 1);
--
-- Dumping data for table role_user
--
INSERT INTO role_user VALUES
(1, 1),
(2, 2);
--
-- Enable foreign keys
--
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
<reponame>it-gro/PIT
create or replace package pit_test_cases
as
/* Test case for toggle context functionality
* %usage Tests, whether a method toggles tracing on and off correctly
* Test flow:
* - call proc with default logging
* - call proc with toggle on
* Expectation:
* - Context gets switched when entering TOGGLE ON immediately
* - Context gets back to default after leaving toggle method
*/
procedure toggle_context_1;
/* Test case for toggle context functionality
* %usage Tests, whether a method toggles tracing on and off correctly
* Test flow:
* - call proc with default logging
* - set context to LOG_ONLY
* - call proc with TOGGLE ON
* Expectation:
* - Context gets switched to LOG_ONLY
* - Context gets switched on when entering TOGGLE ON immediately
* - Context gets back to LOG_ONLY after leaving toggle method
*/
procedure toggle_context_2;
/* Test case for toggle context functionality
* %usage Tests, whether a method toggles tracing on and off correctly
* Test flow:
* - call proc with default logging
* - call proc with TOGGLE ON
* - call proc with TOGGLE_OFF
* Expectation:
* - Context gets switched on when entering TOGGLE ON immediately
* - Context gets switched off when entering TOGGLE_OFF immediately
* - Context gets switched on when entering TOGGLE_ON again
* - Context gets back to default after leaving TOGGLE ON method
*/
procedure toggle_context_3;
/* Test case to prove that errors get thrown no matter what the log settings are
* %usage Tests, whether a method fires an error correctly
* Test flow:
* - set context to TEST_OFF
* - call PIT.ERROR
* Expectation:
* - ERROR gets thrown and captured
*/
procedure catch_error_anyway;
/* Test case to prove that errors get thrown no matter what the log settings are
* %usage Tests, whether a method fires an error correctly
* Test flow:
* - set context to TEST_OFF
* - call PIT.ERROR
* Expectation:
* - ERROR gets thrown and re-raised to calling environment
*/
procedure catch_fatal_and_stop;
end pit_test_cases;
/ |
CREATE OR ALTER PROCEDURE [translation].[test nulls_can_be_a_value_translation_within_update_tofroms]
AS
BEGIN
-----------------------------------------------------------------------------------------------------------------
-- Arrange:
-----------------------------------------------------------------------------------------------------------------
EXEC [tSQLt].[FakeTable]
@TableName = N'audits',
@SchemaName = N'dda';
INSERT INTO dda.[audits] (
[audit_id],
[timestamp],
[schema],
[table],
[user],
[operation],
[transaction_id],
[row_count],
[audit]
)
VALUES
(
1029,
'2021-01-28 15:37:41.667',
N'dbo',
N'SortTable',
'sa',
'DELETE',
34827897,
1,
N'[{"key":[{"OrderID":101035,"CustomerID":450}],"detail":[{"ColChar":{"from":null,"to":"0x999 "}}]}]'
);
-- Create canned mappings:
EXEC [tSQLt].[FakeTable] @TableName = N'dda.translation_values', @Identity = 1;
INSERT INTO dda.[translation_values] (
[table_name],
[column_name],
[key_value],
[translation_value]
)
VALUES
(
N'dbo.SortTablE',
N'ColCHaR',
N'0x999',
N'TRANSLATED:1000'
);
DROP TABLE IF EXISTS #search_output;
CREATE TABLE #search_output (
[row_number] int NOT NULL,
[total_rows] int NOT NULL,
[audit_id] int NOT NULL,
[timestamp] datetime NOT NULL,
[user] sysname NOT NULL,
[transaction_id] sysname NOT NULL,
[table] sysname NOT NULL,
[operation_type] char(9) NOT NULL,
[row_count] int NOT NULL,
[change_details] nvarchar(max) NULL,
);
-----------------------------------------------------------------------------------------------------------------
-- Act:
-----------------------------------------------------------------------------------------------------------------
INSERT INTO [#search_output] (
[row_number],
[total_rows],
[audit_id],
[timestamp],
[user],
[table],
[transaction_id],
[operation_type],
[row_count],
[change_details]
)
EXEC dda.[get_audit_data]
@TargetUsers = N'sa',
@TransformOutput = 1,
@FromIndex = 1,
@ToIndex = 10;
-----------------------------------------------------------------------------------------------------------------
-- Assert:
-----------------------------------------------------------------------------------------------------------------
DECLARE @rowCount int = (SELECT COUNT(*) FROM [#search_output]);
DECLARE @auditId int = (SELECT audit_id FROM [#search_output] WHERE [row_number] = 1);
DECLARE @row1_json nvarchar(MAX) = (SELECT change_details FROM [#search_output] WHERE [row_number] = 1);
EXEC [tSQLt].[AssertEquals] @Expected = 1, @Actual = @rowCount;
EXEC [tSQLt].[AssertEquals] @Expected = 1029, @Actual = @auditId;
DECLARE @expectedJSON nvarchar(MAX) = N'[{"key":[{"OrderID":101035,"CustomerID":450}],"detail":[{"ColChar":{"from":null,"to":"TRANSLATED:1000"}}]}]';
EXEC [tSQLt].[AssertEqualsString] @Expected = @expectedJSON, @Actual = @row1_json;
END;
|
/*
Navicat MySQL Data Transfer
Source Server : 本地
Source Server Version : 50711
Source Host : localhost:3306
Source Database : jyzblog
Target Server Type : MYSQL
Target Server Version : 50711
File Encoding : 65001
Date: 2018-08-24 17:20:19
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `jyz_admin`
-- ----------------------------
DROP TABLE IF EXISTS `jyz_admin`;
CREATE TABLE `jyz_admin` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(255) DEFAULT NULL,
`user_pass` varchar(255) DEFAULT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of jyz_admin
-- ----------------------------
INSERT INTO `jyz_admin` VALUES ('1', 'admin', '<KEY>');
-- ----------------------------
-- Table structure for `jyz_article`
-- ----------------------------
DROP TABLE IF EXISTS `jyz_article`;
CREATE TABLE `jyz_article` (
`art_id` int(11) NOT NULL AUTO_INCREMENT,
`art_title` varchar(100) NOT NULL,
`art_key` varchar(255) DEFAULT NULL COMMENT '关键词',
`art_description` varchar(255) DEFAULT '描述',
`art_thumb` varchar(255) DEFAULT '缩略图',
`art_content` text,
`art_time` int(11) NOT NULL,
`art_author` varchar(50) DEFAULT NULL,
`art_view` int(5) DEFAULT '0' COMMENT '访问次数',
`art_catid` int(11) DEFAULT '0' COMMENT '分类id',
PRIMARY KEY (`art_id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COMMENT='文章表';
-- ----------------------------
-- Records of jyz_article
-- ----------------------------
INSERT INTO `jyz_article` VALUES ('1', 'P2P银行存管门槛将越来越高 年内148家网贷平台上线银行存管', 'P2P银行存管门槛,网贷平台上线银行存管', 'P2P银行存管门槛将越来越高 年内148家网贷平台上线银行存管近年来,网贷平台积极对接银行存管。尤其是去年,网贷行业迎来“存管潮”。', 'http://192.168.80.145/jphp/jyzblog/storage/app/photo/20180822171023428.jpg', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">P2P银行存管门槛将越来越高 年内148家网贷平台上线银行存管近年来,网贷平台积极对接银行存管。尤其是去年,网贷行业迎来“存管潮”。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><center><img alt=\"P2P银行存管门槛将越来越高 年内148家网贷平台上线银行存管 - 金评媒\" height=\"356\" src=\"/ueditor/php/upload/image/20180822/1534928933.jpg\" width=\"540\"/></center><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">近年来,网贷平台积极对接银行存管。尤其是去年,网贷行业迎来“存管潮”。据数据显示,有590家平台在2017年上线了银行存管。今年,网贷平台继续对接存管,寻求达标合规。据网贷天眼数据显示,截至8月20日,今年共148家网贷平台上线银行存管。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">值得一提的是,随着近期发布的《关于开展P2P网络借贷机构合规检查工作的通知》一同下发的《网络借贷信息中介机构合规检查问题清单》(以下简称“108条”),对银行存管的规定更加细化,新增了存管账户绑定的银行卡不允许透支功能的规定,并要求平台在合规检查完成前完成银行存管。不过,“108条”并未提及存管属地化,而此前上海和深圳均有存管属地化要求。有业内人士指出,未提存管属地化对平台来说将在一定程度上减少合规成本 。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">银行存管门槛 未来将越来越高</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">作为合规的标配之一,近年来网贷平台都积极对接银行存管。特别是在《网络借贷信息中介机构业务活动管理暂行办法》明确,“网络借贷信息中介机构应当实行自身资金与出借人和借款人资金的隔离管理,并选择符合条件的银行业金融机构作为出借人与借款人的资金存管机构”后,为了能顺利通过备案,网贷平台对接银行存管的热情更加高涨。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">据数据显示,有590家平台在2017年上线了银行存管。而今年以来仍在持续对接,网贷天眼数据显示,截至8月20日,今年共148家网贷平台上线银行存管。不过,数据同时显示,去年同期的上线银行存管的平台数量为246家。对于同比减少的原因,有业内人士认为,原因在于银行对于存管业务更加谨慎,以及银行存管的要求也更加严格。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">“随着相应的政策约束,银行存管的成本也在提升,所以部分银行选择了退出存管业务。供给端减少,势必增加存管门槛,随着网贷行业出清,银行对于网贷平台的合作准入门槛肯定会越来越高”,网贷天眼副总裁李光耀在接受《证券日报》记者时谈道,“据我了解,有几家银行已经放缓接入存管业务了,要求平台有市值在100亿元以上的上市公司股东背书、省一级的真实国资支持,或者有非常知名的VC、PE投资,才会考虑接入。”</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">虽然业内认为门槛在提高,但每家银行的要求各不相同且并没有统一的标准。而近期发布的“108条”对银行存管的规定更加细化,新增了存管账户绑定的银行卡不允许透支功能的规定,并要求平台在合规检查完成前完成银行存管。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">李光耀认为,之前大部分银行已经不允许绑定信用卡,主要是为了防止用户透支信用卡投资,这次只是把这个要求进一步明确下来。信用卡透支套现本就属于违法行为,可能面临贷款诈骗的刑事风险,而如果将套取的贷款用于放贷牟利,可能涉嫌转贷转牟利罪。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">值得关注的是,“108条”并未提及存管属地化,而此前上海和深圳均有存管属地化要求。有业内人士认为,未提存管属地化对平台来说将在一定程度上减少合规成本 ,减轻部分平台的合规压力。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">存管行为 并非对网贷交易提供背书</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">随着近期网贷行业风险持续发酵,部分上线了银行存管的网贷平台发生问题,有投资者认为,存管银行应承担一定责任。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">对此,有业内人士在接受《证券日报》记者采访时表示,银行存管确实能在一定程度上帮助平台控制操作风险,但信用风险、市场风险是银行存管无法覆盖的。此前下发的《网络借贷资金存管业务指引》也明确表示,“存管人开展网络借贷资金存管业务,不对网络借贷交易行为提供保证或担保,不承担违约责任”,所以银行只负责资金进出,并不是为平台风险进行背书。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">据相关法律法规的规定,存管银行的职责是:存管银行对出借人与借款人开立和使用资金账户进行管理和监督,并根据合同约定,对出借人与借款人的资金进行存管、划付、核算和监督。存管银行对存管专用账户内的资金履行安全保管责任,承担实名开户和履行合同约定及借贷交易指令表面一致性的形式审核责任。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">对于两者之间的法律责任关系,中国银行(601988,股吧)业协会首席法律顾问卜祥瑞解释道,存管银行与网贷机构之间为委托代理关系,即存管银行接受网贷机构的委托,授权保管和划转客户资金;网贷业务当事人(出借人、借款人等)与网贷机构之间也构成委托代理关系,但不直接与存管银行构成委托代理关系。需要特别注意的是,相关规定未要求存管银行承担“共同受托”责任。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">他同时强调,存管银行存管行为并非对网贷交易行为提供银行信用背书。为隔离相关风险,保护存管银行的合法权益,《中国银监会办公厅关于印发网络借贷资金存管业务指引的通知》已明确了存管银行的免责条款。</p><p><br/></p>', '1534929023', '金评媒', '0', '1');
INSERT INTO `jyz_article` VALUES ('2', '18年小额理财怎么样?如何安全投资?', '18年小额理财怎么样,如何安全投资', '18年小额理财怎么样?如何安全投资?在理财界不管你手里资金是多是少,只要不会理财,再多资金也白搭。所以,理财资金不在乎大小,只要有技巧和方法,就算是小额资金,也能带来不错的收益。', 'http://192.168.80.145/jphp/jyzblog/storage/app/photo/20180822173026703.jpg', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">18年小额理财怎么样?如何安全投资?在理财界不管你手里资金是多是少,只要不会理财,再多资金也白搭。所以,理财资金不在乎大小,只要有技巧和方法,就算是小额资金,也能带来不错的收益。那么18年小额理财怎么样?如何安全投资?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><center><img alt=\"18年小额理财怎么样?如何安全投资?1\" src=\"/ueditor/php/upload/image/20180822/1534930144.jpg\"/></center><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">一、先清楚自己的经济实力</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">理财前提是要手里有闲置资金。就算手里资金不多,只有几百几千,那么在投资理财过程中也不能掉以轻心,毕竟任何投资都是会有风险的。所以,要先清楚自己的经济实力,比如个人收入、支出、负债等情况,从而更合理分配出每月拿出多少资金进行投资比较合适,在不影响正常生活的基础上。然而对自己的经济实力有一个明确的了解后,能够帮助我们对下一步的投资理财做好更周全的规划。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">二、对不熟悉的理财产品要谨慎</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">目前适合小额理财产品百花齐放,其中暗藏风险也不计其数。虽说小额理财的资金较少,但那毕竟是辛苦挣来的,万一遭遇了亏损,对投资人还是有一定影响的。所以,在进行小额理财投资时,对自己不熟悉且没有把握的理财产品不要轻易尝试,毕竟小额理财承受的风险跟大额资金都是一样的,假如风险超出了投资者承受范围,那将会给投资人内心造成极大的伤害。因此,小编建议投资者,在选择理财产品时,要多观察,多了解,等熟悉之后再投资也不迟。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">三、小额理财以保住本金为主</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">虽说小额资金比较小,就算投资也不会获得很大的收益。但不管是资金是多是少,都应该以本金安全为主要目的,切不可盲目追求高收益,而忽视其中暗藏的风险。特别是对于一些高风险理财产品,比如股市、期货等,建议不要轻易入内。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">以上是关于18年小额理财怎么样?如何安全投资的介绍,投资理财是个长期的过程,需要投资者不断地学习理财知识和掌握理财技巧,坚持下来不仅能获得可观的收益,还能练就一手理财技能。</p><p><br/></p>', '1534930226', '网贷天眼', '0', '1');
INSERT INTO `jyz_article` VALUES ('3', '持续推进网贷行业整治 各方合力稳妥化解风险', '网贷行业整治,P2P网贷行业', '针对今年夏天集中爆发的P2P网贷行业问题与风险,各方正在统筹协调、群策群力、联动化解。', '', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">针对今年夏天集中爆发的P2P网贷行业问题与风险,各方正在统筹协调、群策群力、联动化解。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">近期,互联网金融风险专项整治工作领导小组办公室(简称互金整治办)、网贷风险专项整治工作领导小组办公室(简称网贷整治办)已部署下一阶段整治工作,作出九项工作安排,并拟定十项举措应对风险。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">上证报记者从多个地方金融办了解到,通过前期的工作,行业总体风险已有所缓解。下一阶段,各地金融办将根据互金整治办、网贷整治办统一部署,持续推进对P2P网贷行业的检查、整治工作,重点将围绕引导不合规平台良性退出、打击各类恶意逃废债行为等方面展开。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">措施有力 各地风险趋于缓解</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">记者获悉,在P2P风险一度集中发生后,各地加大了风险化解和处置力度,全力遏制风险高发、频发的势头,采取了风险集中排查整治、引导违规平台良性清盘退出、对涉嫌非法集资或金融诈骗平台坚决依法打击等一系列有力措施。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">据不完全统计,目前深圳、济南、北京、浙江、广州和上海等地已下发网贷机构退出指引。如上海市互联网金融行业协会8月3日发布退出指引,提出网贷机构业务退出的8个步骤,并明确了业务退出期间应该遵循的6项原则。从网贷机构的角度观察,7月以来,已有数十家网贷平台发布良性退出方案,清盘兑付。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">上海互金整治办相关人士向上证报记者表示,近两周,行业风险总体有所缓解,发生风险的平台数目有所减少,涉及的待偿金额有所下降。近期浙江网贷行业的情况,也呈现出类似特征。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">针对此次风险集中爆发时出现的借款人恶意逃废债行为,监管部门也及时采取相应措施,互金整治办日前下发了《关于报送P2P平台借款人逃废债信息的通知》。目前,上海已有50多家网贷平台抓紧梳理、上报了一批逃废债的出借人名单。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">各方合力 规范运营化解风险</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">P2P网贷行业具有跨区域经营、涉众面广、平台业务极其分散等特征,在整治过程中亟须各方合力,共同化解风险。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">针对近段时间种种网贷风险问题,互金整治办、网贷整治办已联合召开网贷机构风险处置及规范发展工作座谈会,部署下一阶段整治工作,指出做好网贷风险专项整治是防范化解重大风险攻坚战的重要战役,各地要提高思想认识,切实承担属地风险处置责任,坚持市场化法治化原则,实现法律效果和社会效果的统一。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">据悉,目前地方金融办正根据互金整治办、网贷整治办统一部署,持续推进对P2P网贷行业的检查、整治工作。从梳理来看,重点集中在引导不合规平台良性退出、打击各类恶意逃废债行为、坚决打击取缔非法金融活动、加强投资者宣传教育等方面。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">上证报记者注意到,考虑到各地网贷机构的不同特点,地方金融办的整治工作也呈现出不同方式。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">比如,浙江省将积极引导金融机构按照市场化原则,通过资产转让、债务重组、兼并收购等方式,帮助网贷机构降低流动性风险,提高风控能力。而上海互金整治办正在推动通过相关信用信息平台,对部分恶意逃废债的行为加强失信惩戒。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">下一阶段的整治工作,将更贴近行业实情。比如,有些平台就是简单的流动性问题,但资产质量较好,监管的重点就在于帮助平台将好的资产迅速变现。不过,某地方金融办人士坦言,整治工作还是承受了较大压力,因为缺乏相关法律依据,人员编制也不匹配,专业性较为欠缺,“过去几年,网贷行业缺乏准入门槛,现在发展到一定程度,再处置确实比较难。”</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">因此,整治工作更需要各方合力进行,也需要一定时间来化解。接近监管的人士表示,目前各部门都在统筹协调,“不管什么情况,各方都要付出努力。从监管角度而言,要坚持法治化原则和底线,防范道德风险,为行业发展提供规则,补好制度短板,这中间当然也有很多矛盾,需要平衡。”</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">上海互金整治办也表示,在后续整治、监管及风险防控工作中,需要加强央地联手、部门联动、市区联合、中介参与、社会监督,整合调动各方资源共同开展工作。</p><p><br/></p>', '1534930363', '网贷天眼', '0', '1');
INSERT INTO `jyz_article` VALUES ('4', '政府正在奖励P2P行业中的“好孩子”', 'P2P行业,P2P专项整治', '8月4日,全国互联网金融整治办、P2P专项整治工作小组办提出“允许合规机构继续经营”“条件成熟的机构可按要求申请备案”等九项明确要求;', '', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">最近两个月,P2P平台爆雷不断,与此同时,来自监管层的新闻也未间断。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">8月4日,全国互联网金融整治办、P2P专项整治工作小组办提出“允许合规机构继续经营”“条件成熟的机构可按要求申请备案”等九项明确要求;8月8日,全国互联网金融整治办下发了《关于报送P2P平台借款人逃废债信息的通知》,要求各P2P平台尽快报送老赖信息;8月12日,监管部门提出十项举措缓释网络借贷风险;8月16日,中国银保监会召集四大资产管理公司开会,要求协助化解P2P爆雷风险。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">十几天里,相关政策涉及到包括央行征信局、发改委财经司、中国银保监会的多个部门。最重要的消息是8月13日《网贷合规问题检查清单》108条发布,意味着全国范围内的P2P合规检查正式拉开帷幕。此外,在舆论上,代表官方意志的《人民日报》评论称“眼下互联网理财行业出现一些变化是正常的市场出清”。种种信号表明,监管层正在对本轮P2P爆雷潮进行“良性引导”而非“一刀切关停”。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">这让人想起三年前。2015年,以e租宝非法集资案为代表的P2P第一次大规模危机之后,互联网金融政策一夜之间180度大转弯,相关部门一度暂停了任何跟互联网理财相关的公司注册。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">本轮P2P危机,为什么监管层的表现迥异于三年前?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">一、监管回归本源</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">哪怕是市场经济最彻底的国家,某个新兴市场出现后,都避免不了与政府部门的长时间磨合。更何况,金融行业里,针对机构的浪潮式监管是常态,无论是国内还是国外。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">1997年亚洲金融危机之后,国内整个银行业面临技术性破产。国有大行剥离大量不良资产,成立四大资产管理公司。2000年左右,证券公司广受庄股、内部交易诟病。2003年,南方证券轰然倒塌,开启了之后券商行业良性发展新时代。信托行业1979年起步,40年间经历七八轮重点整顿,至2001年时才颁布《信托法》,法律上终于奠定了行业发展基础。这些正规持牌金融机构也是在业务开拓、监管合规的博弈当中一路血泪前行,始有今日之格局。工行如今睥睨天下,谁记得当年成立华融资产管理公司剥离巨额不良资产时,在国际上是何等落魄。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">互联网金融虽然是新兴金融形式,其商业模式的“初心”并无问题。P2P在中国最早起步时就有普惠金融的性质,它的初衷是以风险可控的方式,将居民手中闲余资金周转给有需要的个人。P2P机构在其中的核心功能,一是传递信息,一是把控风险。这种模式也并非中国独创,而是从国外引入,国际上有成熟经验。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">实际上,即使中国现代金融业已经发展了几十年,现在反过头来看,P2P要解决的问题仍然广泛存在。传统金融业仍然存在贷款难、贷款慢的痛点。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">互联网金融,尤其是P2P确有传统金融难以企及的优点。它的金融服务的交易成本低,同时互联网带来的“大数据”可以减少金融交易双方的信息不对称,降低融资成本,精准对接融资需求。当然,互联网金融也有缺点。最显著的就是,它在降低贷款人门槛的同时也让骗子的进入门槛大大降低——移动互联网让金融欺诈的空间和受众数量大大增加。正因此,互联网金融的自身特点决定它比传统金融更需要监管。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">当然,加强监管并不是“把洗澡水和孩子一起倒掉”。这就是金融监管与市场之间的互动磨合。伴随着宏观经济与金融环境的变化,各子行业当中的金融机构出现经营问题、暴露合规短板,这正是行业大浪淘沙、去伪存真的契机。从长期来看,这是金融行业自我净化的机制。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">这次P2P机构的整顿,不过是新形势下的另一次周期表现,并不意味着整个行业戛然而止。相反,当监管不再一刀切而是趋于理性、成熟,P2P的行业发展反倒有望迎来业态净化、牌照明确、业务规范带来的新一波红利。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">二、本轮危机的性质不同于三年前</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">监管层的态度与当下宏观经济环境的特点也有关系。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">与2015年那一波相比,这一波P2P爆雷有一个明显特点,此前倒掉的平台很多涉及故意**、非法集资,但这次却有不少正常经营做正规业务的平台也出现倒闭。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">互联网金融跟资本市场和宏观经济环境存在强关联性。宏观经济下行,资产缩水,市场资金流动性紧张,尤其是近期股市大跌,股票质押率下降,很多上市公司由于缺钱就会把网贷平台的钱抽走。流动性危机直接导致借款人逾期率上升,代偿方无法覆盖,平台退出与借款人情绪低落二者互相强化,导致出现连锁反应。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">如果说三年前的P2P爆雷更多是市场主体本身的乱象为主,此次连环雷更多是跟经济大环境相关,尤其是跟流动性紧张和监管趋严后平台合规成本上升有关。正因此,从国家层面来看,应对此次P2P危机也同样放在国家宏观金融政策盘子中。多个相关政策会议均将缓释P2P风险跟“防范化解金融风险攻坚战”这一中央层面经济工作年度目标挂钩在一起。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">从此轮P2P危机的实际过程来看,危机本身就在金融风险化解的大过程中发生。比如,监管层2016年开始逐步加强P2P平台的备案制管理,这一政策本身就让一些平台增加了合规成本以至于成为危机的导火索之一。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">可以说,监管层与市场的关系已经完全不同于三年前。中国P2P平台已经纳入到监管轨道中,正朝着可控可持续的路径发展。2015年,中国P2P高峰时期,有5000多家平台公司,到今年只剩下1800家,这种减少正是中国P2P行业走上正轨的表现。从这个角度看,本轮危机恰恰可能是P2P行业蜕变的一个转折点。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">三、P2P的转型和未来</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">本轮P2P危机迅速发酵,业界一般认为与宏观经济下行和监管舆论引导有直接关系。但从更广的图景来看,整个国内资产管理行业都在近期面临急剧转型,而P2P只是其中一部分。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">4月27日,央行发布了所谓“资管新规”,其中画龙点睛之处在于“打破刚性兑付”,锋芒直指银行理财、信托产品等主流金融机构发行的资管产品。这么多年,居民已经习惯了“存款式投资”,在银行柜台买到的理财也好其他各种名目的产品也要,绝大部分到期都拿到了当时宣传的本息。但这种刚性兑付的背后,隐含了很高的金融风险,搞不好堂堂金融机构也会沦落到麦道夫当年在华尔街的惨景。麦道夫当年操作的是所谓“庞氏骗局”,说白了就是借新还旧。他一边给投资者开出远高于市场同期收益率的超高价码来吸引资金,另一方面用新募集来的钱去填补之前投资者提取收益的窟窿。真实投资所带来的收益,可能只有一点点,远不能满足资金对利息的要求。这种模式的终局,都是资金由于种种原因难以募集到,多米诺骨牌轰然倒塌。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">国内银行、信托、券商等金融机构每期都兑付的各类理财、资管产品,如果底层资产收益不佳,那么偿还也就是靠新募集,所以称为“资金池”。现在好在底层投资情况尚可,没有什么大窟窿。但是显然这是“灰犀牛”风险:世间没有永赚不赔的生意,资金池总会迎来难以支持的寒冬。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">本轮P2P(使用银行存管而非托管,所以不能有资金池)整顿当中,某些伪互金平台的资金池也是治理的重点。在监管洗刷掉跑路者、假项目、庞氏骗局之后,剩下良性运作的产品将随本轮资管行业的改革大潮一起,进入更为透明、匹配的新阶段。从2008年金融危机来看,资产管理机构死掉的原因不一定需要某笔投资产生巨额亏损,更要命的是再难募资、融钱。资金就是流动性,是金融机构的血脉。雷曼兄弟、贝尔斯登在最后关头央求美国政府所做的,就是给笔过桥资金,缓一口气。大盘子其实还在。但这口气没缓过来,顶尖投行轰然倒地。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">现在P2P机构陷入行业寒冬,很大程度上也是因为流动性使然。老百姓对P2P陷入恐惧,不再上网交易,导致很多良性运作的好机构都难以维持血液循环。这一点政府看得很清楚。此次政府专门成立专项工作组,调集银行、AMC等各路资源,就是为了在这种集体恐惧的形势下给P2P行业当中的“好孩子”输血。这本身就是P2P行业情况转好的明确信号。一旦熬过寒冬,这些机构会整合原来“坏孩子”退出产生的空白,规模、利润将产生明显集中,具有更多资源的国企系、风投系互联网金融平台将有更好发展。</p><p><br/></p>', '1534931128', '网贷天眼', '0', '1');
INSERT INTO `jyz_article` VALUES ('5', '北京互金协会:共建社会信用体系联盟 逾期名单共享', '北京互金协会,网贷行业机构', '为落实监管加大对恶意逃废债行为的打击力度和开展联合惩戒的要求,保障金融消费者合法权益,网贷行业机构代表和专业服务机构代表', '', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">为落实监管加大对恶意逃废债行为的打击力度和开展联合惩戒的要求,保障金融消费者合法权益,网贷行业机构代表和专业服务机构代表,于8月9日在北京共同签署《北京市网贷行业共建社会信用体系联合声明》,于8月11日在北京成立共建社会信用体系联盟,共商共建社会信用体系的各项具体措施。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">会后,联盟各单位制定了制约逃废债行为的具体方案和措施:</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">(一)联盟内的网贷机构将逾期M3+的借款人信息以密文脱敏方式报送到联盟系统中,并保持信息的及时更新。联盟联合技术专业机构对名单进行碰撞和筛查等处理,初步筛选出逾期名单。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">(二)联盟根据筛选的逾期名单对联盟内的网贷机构存量用户进行排查:对各家机构存量用户与逾期用户进行碰撞,将存量用户中在其他机构逾期的用户标注出来,提示风险预警。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">(三)联盟对内部机构成员开放查询功能,机构可将新增用户与逾期名单进行比对查询,增强风险用户辨识能力。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">(四)联盟还将通过技术专业服务机构将逾期名单应用于银行、保险、证券等各行各业的社会体系中,形成全社会对逾期借款人的制约和威慑。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">联盟欢迎各界机构积极参与信用体系的共同建设,共同打击逃废债,共同进行联合惩戒。联系请发邮件:<EMAIL>。</p><p><br/></p>', '1534931330', '网贷天眼', '0', '1');
INSERT INTO `jyz_article` VALUES ('6', '上班族有哪些理财技巧?安全吗?', '上班族有哪些理财技巧,理财安全吗', '上班族有哪些理财技巧?安全吗?上班族的每个月薪水大概都是固定的,基本上能够拿来理财的余钱不多,只能算是小本投资理财。', '', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">上班族有哪些理财技巧?安全吗?上班族的每个月薪水大概都是固定的,基本上能够拿来理财的余钱不多,只能算是小本投资理财。然后即便是再微薄的工资,若是真的拿来做理财了,几年后累积下来的数目也是相当可观的。那么上班族有哪些理财技巧?安全吗?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><center><img alt=\"上班族有哪些理财技巧?安全吗?1\" src=\"/ueditor/php/upload/image/20180822/1534931392.jpg\"/></center><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">技巧一:消费数目控制</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">需要给自己设定一个固定的消费数字,提醒自己接下来的一个月,只可以花多少钱,剩余的薪水就存入固定的银行卡里面,月月累积,几年下来一定会是一笔不小的数字。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">技巧二:投资理财找好方向</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">如果你手里有闲钱的话,可以进行投资理财,但是一定要在生活中多学习这方面的知识,听取身边有投资理财经验的人的建议,不要盲目追求高收益,刚刚入行可以先拿出一小部分钱来试探行情,摸索到规律后自然会游刃有余,不要让你的钱始终闲置,失去它的意义。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">技巧三:制定目标</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">做任何事都得有个目标,可以先从自己可能达得到的目标定起。从习惯入手,渐渐就会知道自己需要定一个目标,比如每月强制储蓄多少钱,一年后应有多少本金等。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">技巧四:不盲目跟风</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">不要无脑跟风,选择跟着大部队走,对于自己投资的平台要有具体的了解。别人说好的,对于自己不一定是好的,每个人的投资情况都不一样的,选择适合自己的,才能更好的理财。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">以上就是关于上班族有哪些理财技巧的介绍,理财投资看似简单,其实要做起来却是要花很多的心思的和毅力,坚持就一定会有好的效果。上班族的你学会了吗?</p><p><br/></p>', '1534931429', '网贷天眼', '0', '1');
INSERT INTO `jyz_article` VALUES ('7', '18年金融理财怎么做?有哪些理财技巧?', '18年金融理财怎么做,有哪些理财技巧', '18年金融理财怎么做?有哪些理财技巧?掌握一定的技巧,可以避免理财路上的陷阱,提高警惕性,降低资金风险。那么18年金融理财怎么做?有哪些理财技巧?', 'http://192.168.80.145/jphp/jyzblog/storage/app/photo/20180822175234404.jpg', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">18年金融理财怎么做?有哪些理财技巧?掌握一定的技巧,可以避免理财路上的陷阱,提高警惕性,降低资金风险。那么18年金融理财怎么做?有哪些理财技巧?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><center><img alt=\"18年金融理财怎么做?有哪些理财技巧?1\" src=\"/ueditor/php/upload/image/20180822/1534931493.jpg\"/></center><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">让钱生钱</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">储蓄是"加法"的金钱累积,投资则是用"乘法"在累积财富。理财越早开始越好,但不应该太早开始投资。如果没有好的观念、策略,赔钱的可能性大。其实理财很简单,从周围的点点滴滴做起,都是为自己将来能够更好的投资做准备。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">学习富人的理财心得</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">人生中除了金钱,很多都是财富。比如广阔的人脉、充足的信息、扎实的知识。平时多注重这些“财富”的积累,到关键时刻才能助人一臂之力。言行举止要向富人看齐。在必要的情况下,不要吝惜钱,但即便如此,也要进行合理消费。不是因为虚荣而是因为需要,该用钱的时候决不吝啬。追求合理消费,节约与吝啬截然不同。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">避免长期低收益投资</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">长期的低收益投资其实储蓄也是一种,另外可能就是国债。尽管这些资金的存放方式有它的作用,但是大额资金需要避免这类对财富增值作用不大的投资形式。如今是一个资产配置转换的时代,货币政策宽松、银行的利率低,两个方面因素的叠加作用,相当于无风险投资的收益在减少。因此要进行适当的“冒险”、适当的投资。但也不能一味的追求高收益投资,高收益投资也就意味着更高的风险。资金量一般的应以稳健投资为主,防范高风险投资对可能带来的不利影响</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">以上就是关于金融理财怎么做和理财技巧的介绍,希望可以对大家有些帮助~</p><p><br/></p>', '1534931554', '网贷天眼', '0', '1');
INSERT INTO `jyz_article` VALUES ('8', '上海金融法院揭牌成立 管辖范围涵盖P2P纠纷', '上海金融法院成立,P2P纠纷', '据新华网报道,为健全完善金融审判体系、营造良好金融法治环境,上海金融法院于20日揭牌成立。', 'http://192.168.80.145/jphp/jyzblog/storage/app/photo/20180822175403150.jpg', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">网贷之家综合 据新华网报道,为健全完善金融审判体系、营造良好金融法治环境,上海金融法院于20日揭牌成立。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"/ueditor/php/upload/image/20180822/1534931620.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2018年3月28日,中央全面深化改革委员会第一次会议审议通过了《关于设立上海金融法院的方案》;4月27日,十三届全国人大常委会第二次会议通过了关于设立上海金融法院的决定;8月7日,最高人民法院公布关于上海金融法院案件管辖的规定。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">据悉,上海金融法院正式成立后,将紧紧围绕金融工作服务实体经济、防控金融风险、深化金融改革的任务,对金融案件进行集中管辖,推进金融审判体制机制改革,着力提高金融审判质效和司法公信力,提升国际金融交易规则话语权;借鉴发达国家和新兴市场国家金融司法的有益经验,结合我国经济社会发展状况以及审判工作实际,探索完善中国特色的金融司法体系;深化司法体制改革,优化司法职权配置,全面落实司法责任制,规范审判权力运行机制,实行法官员额制,精干内设机构,推行扁平化管理。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">而根据最高人民法院8月7日公布的关于上海金融法院案件管辖的规定,该法院管辖上海市辖区内应由中级人民法院受理的下列第一审金融民商事案件:</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">——证券、期货交易、信托、保险、票据、信用证、金融借款合同、银行卡、融资租赁合同、委托理财合同、典当等纠纷。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">——独立保函、保理、私募基金、非银行支付机构网络支付、网络借贷、互联网股权众筹等新型金融民商事纠纷。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">——以金融机构为债务人的破产纠纷。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">——金融民商事纠纷的仲裁司法审查案件。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">——申请承认和执行外国法院金融民商事纠纷的判决、裁定案件。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">同时,上海金融法院管辖上海市辖区内应由中级人民法院受理的以金融监管机构为被告的第一审涉金融行政案件。以住所地在上海市的金融市场基础设施为被告或者第三人与其履行职责相关的第一审金融民商事案件和涉金融行政案件,由上海金融法院管辖。当事人对上海市基层人民法院作出的第一审金融民商事案件和涉金融行政案件判决、裁定提起的上诉案件,由上海金融法院审理。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">此外,当事人对上海金融法院作出的第一审判决、裁定提起的上诉案件,由上海市高级人民法院审理。上海市各中级人民法院在上海金融法院成立前已经受理但尚未审结的金融民商事案件和涉金融行政案件,由该中级人民法院继续审理。</p><p><br/></p>', '1534931643', '网贷之家', '0', '1');
INSERT INTO `jyz_article` VALUES ('9', '当现金贷遇上房产中介 又生出了新的怪胎', '现金贷,互联网金融风险专项整治', '近期,关于房租暴涨的话题炒的沸沸扬扬,其中也提到了长租中介与相关金融机构合作,让不少人租房时莫名其妙的借上了现金贷', 'http://192.168.80.145/jphp/jyzblog/storage/app/photo/20180824111548632.jpg', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">近期,关于房租暴涨的话题炒的沸沸扬扬,其中也提到了长租中介与相关金融机构合作,让不少人租房时莫名其妙的借上了现金贷。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">让我思绪一下回到了半年多前。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2017年12月1日,互联网金融风险专项整治、P2P网贷风险专项整治工作领导小组办公室正式下发《关于规范整顿现金贷”业务的通知》。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">通知从场景、利率、牌照等方面对行业做出规范,清晰的勾勒出未来现金贷”的治理轮廓。比如:《通知》要求现金贷机构持牌经营、利率不得高于36%、不得向无收入来源的借款人发放贷款;存量业务中,无消费场景的现金贷暂停发放,限期整改;禁止现金贷通过P2P网贷融入资金,银行不得为无牌机构提供助贷资金等。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">三大命门,一一命中。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">此后,大家纷纷找场景,这么个挣钱的营生,不想停啊。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">有人找到了电商分期,搞出了手机套路贷、手机回租等怪胎。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">有人退回了地下高利贷,搞出了借条。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">但真正影响国计民生的,还是租房,不但产生了房租贷、房租分期的怪胎,还变相推高了房租。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">上面两种,好多都还是现金贷的受众转过来的老哥、黄赌毒或羊毛党。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">但租房的,都是勤勤恳恳、本本分分的劳动人民,比如小白领,这也是现金贷最喜欢的偶尔缺钱、有固定收入、有偿还能力的人群。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">怎么让这群韭菜上钩呢?需要点小伪装。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">比如长租公寓的房子一般都经过再次装修,现代社会,讲究的就是效率,10天装修,3天入住。不管板材如何,甲醛多少,长疙瘩、起红点统统不管,投诉了最多也就换个房间。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">粗看都是年轻人喜欢的简约、性冷淡风,价格自然就上来了。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">房租一高,就涉及到付款问题,中介会贴心的问你要付三押一还是付一押一。年轻人嘛,存款都不太多,肯定喜欢月付。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">比如,北京的李明在通过蛋壳公寓租房并选择付一押一后,发现自己不是交房租给蛋壳,而是给了一家第三方金融服务平台,签约时,中介帮他办理了平台账号。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">如此以来,他不是按月交房租,还是按月还贷。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">有贷款就有利息,因为房租数额小,所以每个月 并不太明显。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">问题是你晚几天交房租,房东一般还能通融,最多骂几句,可你晚几天还贷,就迎来了催收,甚至上征信。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">关键是,很多人根本不知道自己借了款或者叫现金贷,连个知情权都没有。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">类似模式不仅存在于蛋壳公寓,我爱我家,自如友家和58同城等也推出了类似的与第三方金融机构合作的分期产品。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">实质上,这种模式下,租客在租房的同时,实际承担着现金贷的责任,即租客在和租房平台签下合约之后,由第三方平台垫付了租客需缴纳的租金总额,而租客每月缴纳的房租,实际上成为了替金融机构偿还的贷款。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">北京如此,上海呢?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">问问身边的小姑娘,用的是自如。因为是季付,所以还没牵涉到贷款产品。可到自如APP上一看,也发现了轻松付的影子。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"/ueditor/php/upload/image/20180824/1535079302.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"/ueditor/php/upload/image/20180824/1535079303.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">就是个分期产品,网站上也有推介。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">算下优惠后的综合费率,因为人家是叫费用的,没叫利息。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">35.49*12/1690=25.2%</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">优惠之前是50.70*12/1690=36%,堪堪踩着红线走。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">推广期有优惠,以后未必的,所以后路已经留好了。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">看着不多,这是选了个房租低的,北上广上五千破万的房租都比比皆是。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">自如是链家的,而链家还是有金融属性的,老早之前的首付贷就他们搞出来的。听说在他们家买二手房,税费什么的都可以借消费贷,支持你把每一分钱都投入首付,但中介费,他们倒不让分期。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">这年头,不光金融行业做金融,房产中介也可以。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">不过,你以为长租中介只坑房客吗?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">非也非也,房东也是韭菜,一样割。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">我就专门采访了一个自如的房东。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"/ueditor/php/upload/image/20180824/1535079303.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"/ueditor/php/upload/image/20180824/1535079303.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">首先,抬高的房租很多并未给到房东,资本推动涨租,自然资本要来收割。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">其次,房东出租个房子居然也成了贷款人,说是自如每个月会按期还款,但万一他忘了,房东就成了还款人,还有违约上征信的风险。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">当然,资本的进入为的就是多重的收益,推高房租,差价可以收一次。每月付租,利息收一次,每月服务,服务费还能再割一轮。只要你住,再勤快也得交服务费,是租金的8%。而且一交一年,想退万难。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"/ueditor/php/upload/image/20180824/1535079303.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"/ueditor/php/upload/image/20180824/1535079304.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">这密密麻麻的,有几个细看的。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">房东跟房客一样,都是上船容易下船难,除非你肯赔很多钱。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">这就是监管要求的场景?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">突然想起了《围城》来钱老先生的话,中国人真可怕,好东西,来一样,毁一样。而放到金融领域,金融创新跟犯罪的距离越来越小,前有理财计划,后有各种分期,然后又衍生出各种怪胎。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">倘若国人把钻空子的功夫真的用在发明创造上,中国人拿诺奖能赶上乒乓天团出征各类比赛。</p><p><br/></p>', '1535080549', '网贷之家', '0', '1');
INSERT INTO `jyz_article` VALUES ('10', '如何运用108条筛选网贷平台:这五条底线不能碰!', '108条筛选网贷平台,网贷行业整改验收', '日前,《网络借贷信息中介机构合规检查问题清单》(全国108条)下发。网贷之家研究院院长于百程表示,108条问题清单的明确,标志着网贷行业的整改验收工作正式实质性启动。', 'http://192.168.80.145/jphp/jyzblog/storage/app/photo/20180824112120894.jpg', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">日前,《网络借贷信息中介机构合规检查问题清单》(全国108条)下发。网贷之家研究院院长于百程表示,108条问题清单的明确,标志着网贷行业的整改验收工作正式实质性启动。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">对于平台而言,108条是平台的底线。对于投资人而言,逾越底线的平台应予以规避。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第一条底线:物理场所宣传</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">笔者去人民公园,一群叔叔阿姨在相亲角宣传自家儿女如何优秀。一把阳伞上张贴了一张简历,上书:XXX,年龄33,名校硕士毕业,年薪50万,肤白貌美。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"https://web-documents.oss-cn-hangzhou.aliyuncs.com/uploads/2018/0824/20180824102841246.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">虽说年龄大笔者9岁,但条件优渥。有道是女大三抱金砖,如今三块金砖在我眼前,如何不教我心动。我站了好久,待阳伞后的阿姨搭腔。没想到,阿姨不置一言,视若无睹。正待离开,这位阿姨和一大叔搭上了。侧耳旁听,原来这位相亲女子已经离异。侧眼一看,照片不过如此。就这般条件,还敢嫌我貌陋形秽。笔者愤愤不平,缓缓走过长长的相亲队伍,竟无一人搭理。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">笔者扫了不少相亲简历,大多条件不错。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">回出租屋的途中,有家线下的财富公司在办活动。出于职业敏感,我驻足观望。不多时,一位工作人员递上宣传册页。心中一喜,一定是我长得像有钱人。宣传册页上,产品最高年化收益率12%,销售人员称保证本息。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">如果该年化收益率12%的产品能够保证本息,何愁无人问津?如果男男女女果真如叔叔阿姨所言,何必去人民公园相亲?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">回到出租屋中,瞟到刚脱下的阿迪主,总觉得不对劲。我哪像个有钱人,销售人员一定是看我好骗,才会理我。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"https://web-documents.oss-cn-hangzhou.aliyuncs.com/uploads/2018/0824/20180824102842146.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">物理场所给予销售人员一定的便利,通过投资者的穿着谈吐,判断其投资经验和资金多寡。缺乏投资经验,风险意识不足的投资者,很有可能受花言巧语蒙蔽。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">108条中的第9条规定,网贷机构不得自行或委托第三方在互联网、固定电话、移动电话等电子渠道以外的物理场所进行宣传或推介融资项目,通过线下网点自行推介项目、获取资金,委托第三方在线下推介项目、获取资金。如果投资者发现平台违反第9条规定,可要小心了。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第二条底线:借款余额超限</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">4年前,我大二。那年我还是妇女至宝,不会谈恋爱,人畜无害。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">姑娘家最爱找我聊天,关于爱情,关于她们的男友,关于她们的男友又买了什么礼物。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"https://web-documents.oss-cn-hangzhou.aliyuncs.com/uploads/2018/0824/20180824102843720.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">笔者以算八字为乐,身边好友常以测姻缘为由虐我这条单身狗,这两位姑娘也不例外。她俩提供男友的八字、姓名竟然完全一致。后经证实,两位姑娘的男友为同一人。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第39条要求,网贷机构仍存在2016年8月24日后新增自然人、法人或其他组织的借款余额超限额的情形。即同一自然人(包括个体工商户)在同一网贷机构的借款余额超过人民币20万元;同一法人或其他组织在同一网贷机构的借款余额超过人民币100万元。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">脚踏两只船的都是渣男,超过限额的是渣平台。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第三条底线:校园贷、现金贷、对接金交所</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">从小就被教育,好学生是没有时间谈恋爱。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">笔者曾在衡水中学就读,同一届只有屈指可数的几对公开情侣。这几对情侣的高考成绩大多一般,老师诚不欺我。由于在成年前没有恋爱经验,成年后我不会谈恋爱了。相似的,由于封闭式的教学,我一度不会打理钱财。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">学生缺乏理财经验,容易过度消费,对贷款的认知不足,最终陷入以贷还贷的境地。一刀切或许太过粗暴,却是保护学生的一种手段。正如同在衡中读书时,禁止恋爱一样。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第87-89条分别是:</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2017年6月之后,仍在违规开展以在校学生为放款对象的校园网贷业务;</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2017年7月15日后,仍与各类地方金融交易场所开展合作。存量合作业务未逐步转让或清偿;</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2017年12月20日以后,仍开展现金贷”业务;存量业务未逐步压缩,未制定退出时间表。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">现在仍在以身犯险,触犯以上底线的平台,一定不能投。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第四条底线:信息披露不充分</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">笔者自幼家贫,打小没玩过电脑游戏。幸而有金庸先生的小说,童年才不至于枯燥。14部小说翻得发黄,以至口读能诵。其中,笔者最认同的一句话出自殷素素之口:越漂亮的女人越会骗人。”</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">笔者曾有一位漂亮的前女友,一度觉得配不上她。后来才知道,有人说笑时把我塑造为富二代的形象。众人以讹传讹,她信以为真。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">真相揭开后,她离开了我。她爱的不是我,爱的是传说中的富二代。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">后来啊,我还是容易被漂亮的女孩子骗了,谁让她们漂亮呢?被漂亮女孩子骗,总好过被不漂亮的女孩骗。你说是吧。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"https://web-documents.oss-cn-hangzhou.aliyuncs.com/uploads/2018/0824/20180824102844189.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第69条称,未在官方网站及提供网络借贷信息中介服务的网络渠道显著位置设置信息披露专栏、展示信息披露内容。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">截止2018年8月23日,在中国互联网金融协会信息披露系统中,仅能查询到119家平台数据,且存在信息更新不及时、选择性数据披露等现象。如市场关注的逾期、不良等数据,被很多平台选择性规避。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">数据做得漂亮未必是好平台,连数据都不愿公布的平台怕是有鬼!</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第五条底线:规模控制不到位</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">我认识一对新婚夫妇,两人的合计体重从婚前的180公斤减到婚后的150公斤。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">作为一名单身肥狗,我深感敬佩。克己最为困难的,体重都能减下来,还有什么是做不到的呢?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第107条是对双降”规定的贯彻,若检查时点的规模总量较2017年6月增长幅度较大,则属于规模控制不到位。投资者可以通过公开信息,查询规模总量是否下降。忤逆的平台纯属和监管层做对,投不得。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">监管层下发了108条,不仅是对平台的要求,也是对投资者的告诫:违反108条的平台不能投。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">挑选平台和谈恋爱是一样一样的,谈恋爱可以试错,结了婚后试错成本可就高了。待投资者投入重金,平台一雷,代价就大了。 </p><p><br/></p>', '1535080880', '网贷之家', '0', '1');
INSERT INTO `jyz_article` VALUES ('11', '2018上班族怎么理财?上班族理财的项目有哪些?', '2018上班族怎么理财,上班族理财的项目有哪些', '2018上班族怎么理财?上班族理财的项目有哪些?随着经济的发展,各行各业的人都有了理财的观念,而不仅仅是将存款存入银行中', 'http://192.168.80.145/jphp/jyzblog/storage/app/photo/20180824112355835.jpg', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2018上班族怎么理财?上班族理财的项目有哪些?随着经济的发展,各行各业的人都有了理财的观念,而不仅仅是将存款存入银行中,那么2018上班族怎么理财?而市场上这么多理财产品,股票,基金,债券,现货,保险,P2p等,对于上班族理财的项目有哪些呢?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><center><img alt=\"2018上班族怎么理财?上班族理财的项目有哪些?1\" src=\"/ueditor/php/upload/image/20180824/1535080981.jpg\"/></center><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">在理财道路上,都是要用到钱,没钱拿什么来投资,要知道天上是不会平白无故掉馅饼,因此在选择理财产品前,要备好资金。资金准备要从储蓄、消费和和投资理财三方面入手。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">闲余资金到位后,有一个好的理财规划的习惯能更好地帮助你实现理财。比如说,学会列购物清单能有效帮助你减少不必要的开支,量入为出的生活方式能使你的资金利用达到最优化的效果,养成记账的习惯可以让你对自身财务状况有清楚的了解。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">对于上班族来说,没办法在工作时间理财,只是相对于短期而言,却不等于不能进行长线投资。就拿股票来说吧,几番暴跌之后,不少个股价格是腰斩都不止,估值明显也合理了不少。要说抄底这件事,其实谁都没有把握抄到真正的底部。如果在相对低的点位,选取一只业绩较好估值又低的股票,做阶段性的长线投资相对而言是比较省心的。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">不过,股票毕竟风险太高,投资比例不宜太高,还得配合其他理财产品。其实期限较长的国债和银行理财产品的收益率也不算低,选好一个长线产品放几年,未必不划算,毕竟,未来利率继续下行的预期很高,早点入手也算提前锁定高收益。而且不需要频繁进出,非常适合忙碌的上班族。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">最后,在不清楚损益情况下,不要四处乱投资,很多上班族通常是抱着能赚则赚的心理,认为投那么多产品总有一个可以赚钱。但事实上,每天只有那么一个产品赚并不代表整体收益就增加,应计算每个投资项目的具体损益情况,那才是最后的实际收益。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">以上对2018上班族怎么理财?上班族理财的项目有哪些?做了详细的介绍,但是年轻人要懂得并且舍得投资自己,上班族如何理财除了要学会给钱投资,还要给自己投资,因为投资自己,就是全方位的提升自己的学识、能力、内外兼修。</p><p><br/></p>', '1535081035', '网贷天眼', '0', '1');
INSERT INTO `jyz_article` VALUES ('12', '都是投网贷,为什么别人的收益比你高?', '年化收益15%-20%,网贷新人', '为什么看群里面好多人说某某平台收益还可以,年化收益能有15%-20%,为什么我去注册投资的时候,还是同一个平台,到手的收益怎么只有他们的2 3啊?', '', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">为什么看群里面好多人说某某平台收益还可以,年化收益能有15%-20%,为什么我去注册投资的时候,还是同一个平台,到手的收益怎么只有他们的2/3啊?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">左哥发现,对于很多刚接触网贷不久的投资新人来说,这样的问题很常见。即便是一些接触网贷较长的投资人,也普遍存在同样的问题。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">到底是为什么?难道是群里面的其他投资人都是忽悠人的嘛?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">实际上并不是!你跟其他人的区别就在于:你们的投资策略,从一开始就有问题,导致你们都是投资同一个平台,收益差了好几个点,甚至更多!</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">究竟咋回事,今天左哥就来跟大家再啰嗦几句,为什么投同一个平台,你的收益却比别人低。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">1. 投资标的不同</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">很多网贷新人遇到最多的误区,就是不知道平台有针对新人的新手专享标。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">通常这类标的,只针对注册后第1-3次投资的新用户,收益相对相同期限的普通标来说,会高几个点。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">同样的,平台在特定的时间节点,比如说重大节假日还会推出活动标。不仅收益相比平时加息几个点,而且数量有限,都需要靠抢标。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">所以如果别人投的是这两类标的,而你的不是,那么自然收益率就比不上别人了。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2. 推广活动奖励</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">熟悉网贷行业的都知道,平台的获客难度和成本越来越高。所以平台在推广的时候,为了提升转化效果,会做一些首投奖励活动,比如首投返现、首投送京东卡等等(这个左哥的粉丝都懂)。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">这些奖励折算下来,根据不同档位金额的不同,可能也有2%-10%左右的收益加成。就算是参与同一个活动,可能每个人之间也会出现差异,有些人拿到了全部的奖励,而有些人却只能拿到一个。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">比如说:某个平台首投1个月1万送100元京东卡,首投3个月5万送800元京东卡,如果两种期限都是投资5万,奖励折算成年化分别是2.4%、6.4%,叠加到标的收益上,自然也是相差不少。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">所以在参与活动前,大家要仔细的把活动细则看清楚,然后合理的利用资金去获取更高的奖励和收益。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">3. 返利渠道投资</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">所谓网贷返利,其实说白了就是羊毛,这个跟普通的广告投放不一样。投资人通过第三方平台注册投资平台,可以获得额外的返利,也相当于在原先的基础上获得额外加息。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">实际上,市面上有80%左右的平台,都会有额外的加息返利渠道。本质上说,相当于平台拿出一部分收益率做为广告费找返利渠道推广。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">所以说,如果别人在投资的时候有返利而你没有,那么收益就会比别人低不少。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">不过正确的投资方式,应该是筛选你相投的靠谱平台,然后在第三方返利网站找到对应的平台去投资。别看见一个小平台返现高就想上车,那样迟早会踩雷!</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">4. 小号注册投资</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">这里要告诉大家一个小技巧,如果你没有打算立即投某个平台,即使你对它很感兴趣也不要注册,要等到马上投资之前再进行注册。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">如果你没打算现在就投资某个平台,一定不要着急去注册,要等到马上投资之前再进行注册。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">因为很多平台针对首次注册投资的新用户,才有特殊的福利(参考第2点),还有就是新手红包、加息券在注册之后都是有有效期的,不要注册后不投资就浪费了。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">另外一个就是,就算这个平台你投资了,现在新手又有诱人的福利和活动,完全可以用你家人的身份信息去注册小号投资,比起你自己的账户复投,收益也高出不少。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">5. 平台隐藏奖励</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">这一类奖励,并不是所有的平台都会有,主要还是得看平台的运营策略。比如有些平台为了提高用户粘性、增加新用户而设置的一些隐藏奖励。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">签到奖:每天去平台的APP签到,连续或者累计多次可以获得相应的加息券或者体验金;</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">生日奖:有些平台,会在投资人生日的时候,发放一些比较有吸引力的专属生日礼,比如生日红包、加息券等等;</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">大额奖:这个对投资人要求比较高,只有投资金额较大的大户才有,收益率也比一般的中小户高一些。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">上面这些,只是左哥自己在网贷投资过程发现的一些比较常见的提高收益的方式。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">其实,每个平台都会按资金需要策划运营活动和用户福利,这个需要你们自己多关注平台的动态和相关的规则,以获取更好的收益。</p><p><br/></p>', '1535081135', '网贷天眼', '0', '1');
INSERT INTO `jyz_article` VALUES ('13', '工资理财的技巧有哪些?适合工资理财的产品有哪些', '工资理财的技巧,工资理财的产品有哪些', '工资理财的技巧有哪些?适合工资理财的产品有哪些?工资是每个人重要的收入来源,当工资打入银行卡后,很多人并不是全部拿出来使用,那么工资理财的技巧有哪些?适合工资理财的产品有哪些?', 'http://192.168.80.145/jphp/jyzblog/storage/app/photo/20180824112717280.jpg', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">工资理财的技巧有哪些?适合工资理财的产品有哪些?工资是每个人重要的收入来源,当工资打入银行卡后,很多人并不是全部拿出来使用,那么工资理财的技巧有哪些?适合工资理财的产品有哪些?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><center><img alt=\"工资理财的技巧有哪些?适合工资理财的产品有哪些?1\" src=\"/ueditor/php/upload/image/20180824/1535081213.jpg\" title=\"工资理财的技巧有哪些?适合工资理财的产品有哪些?1\"/></center><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"> </p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">工资理财技巧</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">定时积极的存款。怎样开源节流是理财的第一步。增加收入来源,算好该存的钱,剩下才是能花的钱。虽然工资是有限的,但是每个月发了工资后要做的第一件事,就是把要计划储蓄的钱拿出来,存到银行中,千万不要把要花的一部分钱也储存起来,那么剩下的也就没有什么钱了,就谈不上储蓄了。只要坚持下去,这种习惯会让你收益终身。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">计划采购。在每个月底,都要对自己下个月要采购的东西做一次认真的清点,如:购买服装,蔬菜和日常用品等,并在自己专用本子上记下,然后到市场去了解行情,等要采购的时候,就可以到自己计划的地方去,而不至于盲目的买东西而多花钱,还能改掉自己乱花钱的坏毛病。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">善买保险。工资不高的人还应该为自己为家人买保险,如果家里有人发生意外,无疑是雪上加霜,这会让低收入的家庭背负债台高筑的可能,因此要学会购买保险来降低家庭风险,转移风险,来摆脱困境的目的。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">适合工资理财的产品</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">1. 银行存款。虽然银行的利率不是很高,但是银行存款以后大家就会养成良好的习惯,这样花销就会相应的减少,每个月固定的存入一笔工资,长期下来就会对大家有很大的好处。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2.理财类产品。在适当的时候用自己的工资积累的资金做一些理财类的投资,例如银行的一些小型的理财业务,或者买一些股票也是很不错的选择,不过现在股票和基金风险很大,还是国债要保险一些。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">以上对工资理财的技巧有哪些?适合工资理财的产品有哪些?做了简单的介绍,所以,工薪阶层每个月工资不管是多少,我们一定要学会理财,避免月光,这样一年下来我们也可以攒下一笔钱。</p><p><br/></p>', '1535081237', '网贷天眼', '0', '1');
INSERT INTO `jyz_article` VALUES ('14', '目前:P2P平台到期赎回需要多久?', 'P2P平台到期赎回,P2P平台债转', '最近行业流动性降低,不少人都遇到了产品到期无法及时退出的情况。虽然对投资人来讲都是无法及时退出,但展期、逾期、债转速度变慢、拆底层资产,还是有很大差别。', 'http://192.168.80.145/jphp/jyzblog/storage/app/photo/20180824112845835.jpg', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">最近行业流动性降低,不少人都遇到了产品到期无法及时退出的情况。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">虽然对投资人来讲都是无法及时退出,但展期、逾期、债转速度变慢、拆底层资产,还是有很大差别。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">展期:借款人到期不能及时归还,经批准办理延长还款时间的手续。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">逾期:借款人没有按时还钱,也没有办理展期,就是逾期;当逾期时间很长,还钱可能性很小的时候,就会被记为坏账。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">债转速度变慢:平台采用债权转让的模式来提高流动性,比如,一个人借款1年,但投资人偏好短期产品,所以平台设置了投资人可在30天后发起债权转让。(备注:一部分平台甚至会提供功能主动为投资人发起债转,不需要到期后手动操作)</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">当平台流入资金小于流出资金时,比如现在的很多平台,就会出现债转速度变慢的情况。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">拆底层资产:平台将债权转让的功能直接取消,直接对接到底层资产。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">比如:投资一个8月15日后可转让的标的100元,分别匹配到2个借款人各50元,还款时间分别是9月20日和12月30日,拆底层资产后,正常情况下,第一个50元会在9月20日回款,第二个50元会在12月30日回款。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">总的来说,展期、逾期用于描述资产端表现,债转速度变慢是投资人体验,拆底层资产则是一种行为,4个词相互关联。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">对于平台来说,底层资产肯定会有一定比例的逾期/展期,也就是说,不管是以上哪种形式,逾期都是肯定会有的,但平台一般会尽力避免让投资人感受到。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">我们现在说的逾期平台,一般是指坏账多到兜不住,宣布逾期的平台。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">平台展期,可以理解为平台遇上大面积逾期,但平台认为后期有能力回款而做的举动,也可能是因为平台续贷标过多导致的举措。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">而债转速度变慢如果一直恶化,慢到极致就等于拆底层资产,需要持有到期。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">我们根据自己的投资体验以及社群内投资人的讨论,简单整理了近期27个平台产品赎回需要的时间表格。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">需要注意的是,这里特指的是通过债权转让实现的类活期/锁定期/定期产品。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">单个散标,一般不会遇上赎回时间的问题。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">同时有人提前退出和正常退出的情况下,选择提前退出的人排队序列会靠后。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">产品不同、金额不同,平台资金流入流出的波动,债转速度都会有所不同。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">这个表格的目的更多在于给大家一个参考,希望不要过度恐慌:</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"/ueditor/php/upload/image/20180824/1535081302.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">你们现在在投的网贷平台的赎回/转让速度如何?</p><p><br/></p>', '1535081325', '网贷之家', '0', '1');
INSERT INTO `jyz_article` VALUES ('15', '防范恶意骗贷 互金协会鼓励人脸识别查验借款', '互金协会,人脸识别查验借款', '中国互联网金融协会发布《关于防范虚构借款项目、恶意骗贷等P2P网络借贷风险的通知》提到,鼓励P2P网贷机构与资金存管商业银行加强合作,用“人脸识别”等技术查验核实借款人身份信息。', '', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">在防范网贷机构违规经营风险的同时,市场对借款人“恶意骗贷”、“过度借贷”所引致的风险也引起关注。8月22日,北京商报记者获悉,中国互联网金融协会(以下简称“中国互金协会”)发布《关于防范虚构借款项目、恶意骗贷等P2P网络借贷风险的通知》(以下简称《通知》)提到,鼓励P2P网贷机构与资金存管商业银行加强合作,用“人脸识别”等技术查验核实借款人身份信息。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">《通知》提到,中国互金协会在专项整治中发现,有一些P2P网络借贷机构以及借款人存在虚构借款项目信息、恶意骗贷等违法违规行为,严重扰乱了市场秩序,侵害了人民群众合法权益。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">对此,《通知》要求,P2P网络借贷机构应引导借款人树立诚信理念,在组织对接借款项目时,应要求借款人在借款时签署信用承诺书,保证其提供信用信息、资金用途、还款来源等借款资料的真实性,如提供资料存在虚假不实的,借款人将承担相应法律责任。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">EmoFin AI多模态金融反欺诈项目创始人魏清晨认为,承诺书的约束力有一定限制,资金用途、还款来源的真实性,也需要在放款之后对账户流水进行核验。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">同时,《通知》提到,P2P网络借贷机构应与开展资金存管业务的商业银行加强合作,鼓励商业银行在P2P网络借贷借款人开户、提现等环节采用“人脸识别”等先进技术手段查验核实借款人身份信息。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">魏清晨表示,“人脸识别”技术,一方面是身份核验精度,通过面部特征提取,联网公安部的公民身份数据库,进行身份比对;另一方面是活体检测,需要用户完成一些指定动作,如“眨眼”、“张嘴”、“摇头”等。从这两点来讲,都已经可以满足金融场景的需求。目前,一些头部网贷平台的确已经先后采用了这类技术。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">在魏清晨看来,利用“人脸识别”等技术核验身份,的确是一种精准度高、应用便捷的身份核验入口,便于有效打通“数据孤岛”,使得同一借款人不同来源的多种征信数据汇总评分,进而形成更全面、更精细的客户画像。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">不过,苏宁金融研究院互联网金融中心主任薛洪言也指出,人脸识别环节的引入,增加了成本,在用户体验层面也少了一些便捷性,尤其是如果引入的人脸识别解决方案不太成熟,识别失败率过高会降低用户转化率,所以应用层面的普及性还有待提升。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">除了“面部动作识别”技术之外,魏清晨进一步介绍,“语音声纹识别”也是一种有效的新兴技术。不仅可以用于识别借款人的身份,更加可以识别借款人信审信息的真实性和逾期行为的主动性。诚实客户和被动逾期客户,是努力还款的;而欺诈客户和主动逾期客户,是拒绝还款的。由于这两类客户的还款动机截然相反,所以他们在信审和催收环节,表现出来的情绪结果、情绪活跃度、特定问题的应激反应等都存在人工难于察觉的较大差别。这种应用方案,已经开始帮助信和财富等网贷平台进一步提高风控反欺诈的能力,降低坏账,保障资金安全。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">薛洪言也指出,人脸识别属于生物特征识别技术中的一种,其他如指纹识别、虹膜识别、声纹识别等都属于此类;常用的用户核身方式除了姓名、身份证、手机号、银行卡、静态密码、动态验证码等基础手段之外,还包括设备指纹(通过手机等设备核身)、位置信息、关系图谱等手段。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">此外,魏清晨还建议,在面审环节增加多头借贷、资金用途、还款来源等问题的反欺诈评分权重,利用“面部动作识别”技术,也就是微表情、眼神等去分析借款人上述问题表述的真实性,此类技术已经可以帮助风控人员识别70%的欺诈客户。</p><p><br/></p>', '1535081402', '网贷之家', '0', '1');
INSERT INTO `jyz_article` VALUES ('16', 'P2P磨剑十二载 今朝直面“生死劫”', 'P2P行业,P2P备案', '2018年是P2P发展的第十二年头,也是P2P行业的生死大年。已经开展两年有余的互联网金融专项整治工作被继续延后1-2年,原定于6月30日完成的P2P备案落空。', '', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2018年是P2P发展的第十二年头,也是P2P行业的生死大年。已经开展两年有余的互联网金融专项整治工作被继续延后1-2年,原定于6月30日完成的P2P备案落空。网贷行业自6月中旬以来经历了腥风血雨的洗礼,几百家平台瞬间消亡,头部平台惶恐不安。8月13日银保监会主导的全国性网贷合规检查细则已经下发,预计于2018年年底完成合规检查,P2P备案再次让人看到曙光,市场信心得到快速提升。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">自2006年诞生以来,服务小微和个人弱势群体的P2P很长时间没有得到监管的充分重视,一直到2013年下半年政府及监管有关机构组织调研,P2P才正式以金融创新者的形象进入监管的视野,开始了合规发展的里程。而在e租宝之后,P2P行业被污名化,大量机构去P2P化,行业一度哀鸿遍野。直至2017年上半年P2P整改备案之风刮起,大量机构回归P2P。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">好不容易挺过刚刚平息的P2P暴雷潮,存量P2P是否能够通过合规检查,顺利领到准生证,从此乘上金融持牌经营的大船扬帆起航呢?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">一、2006-2013年:从理想到现实的摸索</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">唐宁是国内P2P的教父级人物,于2006年成立宜信,以债权转让模式开展个人借贷撮合业务。最初很难会有人能把他北大的教育背景、华尔街的工作履历跟民间高利贷从业者的身份结合在一起。一年后,拍拍贷诞生,成为国内第一家线上P2P平台。这家是个有趣的主,在中国债权市场刚性兑付”的大环境下,非得坚持搞纯线上小额无担保模式,碰了一鼻子的灰。 眼看着后起之秀的交易规模上来,背后资方金主也是抱怨频频,拍拍贷不得不放弃了那点执念,推出平台本息保障产品。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">行业内最早进行刚性兑付”的平台是深圳红岭创投,其创始人周世平据说是拍拍贷”平台上的早期出借人,因为痛恨拍拍贷体验不好,愤而于2009年创办红岭创投。本息保障模式下的红岭创投,上架项目越做越大,在2014年3月份开始上线动辄上亿融资规模的项目。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2013年成立的积木盒子、有利网调研了市场发现,打破刚兑不靠谱,但刚兑又不是自己一家小小创业公司能承担的,于是走了条与小额贷款公司、担保公司合作的模式,上线项目动辄基本是500万、1000万、2000万级别,由小额贷款公司、担保公司兜底。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">在这段时期,监管有短期关注过P2P,但却是出于防范风险。2011年8月25日,原银监会印发了《人人贷有关风险提示的通知》,称人人贷(P2P)信贷服务中介公司存在大量潜在风险,要求银行业金融机构采取有效措施,防范民间借贷风险向银行体系蔓延。P2P以坏孩子的形式第一次步入原银监会的法眼,这种对P2P偏谨慎观望的态度也在一定程度上影响了后来银监系统的监管思路。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">二、2013年-2015年:百花齐放的时期</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2013年8月,人民银行等十几个有关部委联合组成了成员豪华的互联网金融发展与监管研究小组,到沪、杭两地走访调研,被调研单位包括多家P2P机构。这一联合调研,使得网贷行业备受鼓舞。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">现在来看,2013年-2015年是P2P行业真正大发展的黄金时期,这个黄金时期空前绝后。在2013年初之前,P2P平台的数量屈指可数,市场为人所知的只有十余家平台,在此期间,P2P平台的数量存量一度突破3000家。黄金期内,形成了行业的中坚力量,也由于大量的骗子和不具备经营能力的个体和机构的混入,导致行业后续进入了落寞期。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">P2P市场在这一时期的繁荣体现在金融机构、上市公司等大量背书能力强的机构的加入。虽然早在2012年2月,中国平安就入场P2P,上线陆金所,但金融机构密集涌入却是在2014年,当年就有有氧金融、e融e贷、民生易贷、民贷天下等银行系P2P上线。国资背景的P2P起始于2012年12月上线的开鑫贷,在这段时间则有先后出现了众信金融、金开贷、德众金融等国资系平台。上市公司也不甘寂寞,独立或抱团发起P2P平台,2015年5月10日上市公司多伦股份甚至发布公告将公司名称变更为匹凸匹金融信息服务(上海)股份有限公司。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">也正是在这个黄金时期,技术与金融才真正开启深度融合。IT领先企业纷纷进军P2P,小米投资积木盒子,新浪、搜狐、网易三大门户网站纷纷搭建P2P,联想则通过孙、子公司构建了庞大的P2P群落,网贷行业真正刮起一场技术旋风。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">很多传统线下金融的创业者转型线上时也大多拉上技术男一起。以和信贷为例,其出身商业银行的创始人安晓博此前已从事五年线下房产抵押借贷,在2013年8月转型线上后,寻找的联合创始人周歆明曾经是京东第三个产品经理。技术和金融融合催生出来的和信贷于第二年就成为规模最大的房抵贷平台。那段时间的网贷圈多的是技术和金融融合产生的让人激情澎湃的故事,大量传统线下金融创业者乐此不疲转型线上。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">P2P的林子大了,好鸟有不少,坏鸟自然也不会少。在没有银行存管甚至第三方托管都不存在的莽荒年代里,一些骗子单纯是看准了在P2P行业圈钱跑路的机会,另一些骗子则是一些过剩产能的企业主,试图通过P2P平台进行自融。这两年的黄金时期也是P2P跑路频频的两年。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">三、2015-2016:从野蛮发展到规范发展</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">在2015年上半年资本市场迎来了久违的牛市,P2P行业却第一次遭遇行业性的流动性危机,持续火爆的股市分流了原本要投向P2P的大量资金。股灾出现后,配资平台又被视为股票市场高杆杠的元凶之一,为P2P的发展蒙上阴影。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2015年7月人民银行等十部委联合发布《关于促进互联网金融健康发展的指导意见》(以下简称《指导意见》)首次为P2P行业正名,明确个体网络借贷是指个体和个体之间通过互联网平台实现的直接借贷”,属于民间借贷范畴”,同时就个体网络借贷业务由银监会负责监管达成部委间的一致意见。行业性质以及监管归口的明确本身算是行业的一个重大利好,极大扭转了P2P上半年的颓势。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">好景不长,同年11月份爆发的e租宝事件一下子开启了行业的冰河期,建国以来波及人数和涉案资金最大的非法集资大案的帽子扣下,压得整个互联网金融行业喘不过气。而原银监会于2015年12月公布了《网络借贷信息中介机构业务活动管理暂行办法(征求意见稿)》(以下简称《暂行办法(征求意见稿)》),监管政策严于市场预期。一时间,无论行业从业人士还是投资人对于行业的信心都有大幅下滑,在2016年2月大王理财为第一家主动清盘的平台,P2P除了跑路终于有了良性退出的案例。一时间,退出P2P成为很多从业人员的选择,仅2016年上半年市场共有247家P2P实现良性退出,平台数量第一次出现下降。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">《暂行办法(征求意见稿)》对于P2P民间借贷信息撮合服务平台的定性给予了明确,就个人贷20万、企业贷100万授信额度的上限做出了规范,推动了这一时期存量P2P平台的密集转型,资产种类逐步聚焦,尤其是聚焦到个人消费信贷。早些年以千万级企业贷项目见长的有利网、积木盒子等平台,基本都转型为个人贷平台。和信贷这样的房抵贷平台也转型得比较彻底,数据显示,在2015年时,房抵贷业务占比中高达98.1%,而在2016年和信贷计划上市时,开始全力转型消费信贷类资产,到2017财年末,抵押贷占比下降到0.8%,此后彻底转型消费信贷类资产。相比较而言,红岭创投这样的大额标历史包袱沉重的平台则陷入存废的尴尬处境。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">也正是因为定位的明确以及监管规则的有章可循,2015年12月宜人贷于美国成功上市,成为纽交所上第一只中国互联网金融股,时隔两年,2017年11月3日,和信贷成为国内互联网金融企业在纳斯达克上市的第一家公司。目前已在美国上市的互金机构已经很多,有个现象值得关注,包括宜人贷、乐信、拍拍贷、趣店、和信贷、信而富等平台基本都是个人贷平台,一定程度上体现了国际资本市场对于个人贷平台的认可。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">四、2016-:合规整改,生死选择</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2016年这一年,大量的P2P从业机构为了规避P2P的严格监管,纷纷试图突围,向第三方线下理财、互联网资管、互联网小贷、现金贷、助贷机构转型,去P2P化”蔚然成风。好在2017年3月各地金融办开始下发P2P整改通知书,于2016年8月正式下发的《网络借贷信息中介机构业务活动管理暂行办法》明确的地方金融监管部门负责为网络借贷信息中介机构办理备案登记”终于有了实质性的举动。与此同时,第三方线下理财、互联网资管、互联网小贷、现金贷、助贷等先后受到整顿,突围战”沦为阵地战”,大量机构开始回归P2P,试图通过备案登记解决合法身份问题。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2017年8月25日,原银监会官网公布了《网络借贷信息中介机构业务活动信息披露指引》,与2016年8月24日发布的《网络借贷信息中介机构业务活动管理暂行办法》、《网络借贷信息中介机构备案登记管理指引》、《网络借贷资金存管业务指引》放在一起共同构成了P2P监管体系的一个办法、三个指引。同年12月全国网贷整治办下发了《关于做好P2P网络借贷风险专项整治整改验收工作的通知》,一时间P2P备案似乎指日可待。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">1+3”监管框架的顺利落地奠定了P2P网贷整改备案的路径图,行业的合规程度大幅度提高。存管银行成为这一时期的重中之重。除了陆金所,有中国平安这个好爹,好歹能拉郎配安排个平安银行做资金存管,其他平台都或多或少遭遇过与商业银行合作的艰辛往事。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">各家银行的最初存管系统很多是第一批签约的平台派人帮助搭建的,这过程中有时候会发生些啼笑皆非的事情:要不然就是搭建完系统,银行突然说出于风险考量因素,不做银行存管了;要不然就是帮忙搭建系统的平台业务转型了,搭建好的存管系统不适用了。更多的情况是签约的存管迟迟落地不了。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">在P2P强推银行存管的时期,民生银行、中信银行等股份制大银曾是对此业务最感兴趣的,然而最终涉足甚少。以和信贷为例,早在2015年9月17日,《指导意见》发布不久,和信贷就与浦发银行签约资金存管合作。但由于e租宝事件的恶劣影响,浦发银行出于审慎考虑退出P2P存管业务,迟至2017年1月,和信贷才通过与江西银行的合作正式上线了银行存管系统。华夏银行一度被北京寄予推行银行存管属地化管理方案下发挥更大作用的期望,但很多平台与其的合作也并不顺畅。更多的P2P平台是密集于2017年下半年甚至于2018年上半年出于备案考虑,开始寻找银行开展存管合作,这些存管银行以城商行、农商行为主,其中江西银行、新网银行签约平台数量最多。对于已经上线银行存管的平台而言,现在比较焦虑的是网贷银行存管白名单的公布时点。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">平台风险准备金的取缔也是这个时期的一个重要转变。2016年10月,行业龙头宜人贷试图以质量保障条款”为名对于风险准备金”做了改头换面尝试,最终还是于2018年3月份基本放弃这种并不太受认可的尝试,开始引入第三方担保机制,提供的信用保证保险保障和担保公司保障。人人贷于2017年11月30日、拍拍贷和团贷网于2018年1月1日起均取消风险准备金以满足监管合规的要求。和信贷算是较早尝试去自担保的头部平台,据其财报披露,早在2017年年初终止了风险准备金政策,同时与长安保险签署了第三方保险协议。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">事实上,互金龙头陆金所上架的平安普惠的P2P项目就一直有引入平安产险的贷款履约保证保险,但对于风险的有效评估以及高昂的保费是束缚P2P与保险公司开展实质性合作的最大障碍。与收费较低的融资性担保公司合作,是一条可行的道路。新组建的银保监会于2018年4月份发布的《融资担保责任余额计量办法》明确规定融资担保业务,包括借款类担保业务、发行债券担保业务和其他融资担保业务”,同时指出借款类担保,是指担保人为被担保人贷款、互联网借贷、融资租赁、商业保理、票据承兑、信用证等债务融资提供担保的行为”,一时间被视为P2P联姻融资性担保公司的利好。但今年8月中旬四川省金融工作局发文明确规定在互联网金融清理整顿结束前,省内法人融资担保公司以及省外融资担保公司在川分支机构不得开展以网络借贷信息中介机构为借贷平台的互联网借贷担保业务”,这条联姻之路短期之内似乎又不是那么好走。总而言之,去风险准备金后P2P行之有效、成本可控的第三方增信措施仍有待持续探索。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2018年7月的雷潮阵阵带来了从业人员和投资人的恐慌,关于这场雷潮的成因以及应对措施,大文在先前的文章中已经谈了很多,这里不再重复。阳光总在风雨后,行业的困难只是暂时的。如果这个行业真的能够证明自己能够做到推进数字普惠金融、服务实体经济,政府一定会鼓励行业的健康发展。这场行业洗牌,在网贷史上,不是第一次,也绝不会是最后一次,洗牌只是将一些行业内的害群之马及早清退,优秀合规平台将会脱颖而出,迎来了良好的发展契机。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2018年是P2P的生死大年,合规检查的出台给网贷行业指出了一条活路,但也并非意味着备案能够快速落地。从当下监管关注的重点看,如何引导机构无风险退出”是最为头疼的事情。生”的问题以死”的问题有效解决为前提,不解决退出平台如何安详死亡、不给社会添堵的问题,就无法给优质合规平台补发准生证。今年8月15日,银保监会召集四大资产管理公司(AMC)开会,要求主动协助化解P2P的暴雷风险,死”的问题的解决有了重大突破。相信借助金融市场更多实力主体的力量,网贷行业的风险缓释机制有望加速构建并完善,生”问题的解决也将为时不远,网贷行业发展的第二春值得期待。</p><p><br/></p>', '1535081484', '网贷之家', '0', '1');
INSERT INTO `jyz_article` VALUES ('17', '网贷平台出现问题后,该如何判断情况是否严重?', '网贷平台,网贷平台该如何判断', '在当前的行情下,很多投资人对于平台的实际情况都很难做出准确的判断。特别是当平台出现问题的时候,有的人因为过度敏感', '', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">在当前的行情下,很多投资人对于平台的实际情况都很难做出准确的判断。特别是当平台出现问题的时候,有的人因为过度敏感,没有搞清楚状况就跟着乱起哄,结果导致小问题变成了大问题;还有的人以为平台问题不大,不以为然,结果错过了出逃的最佳时机。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">我会认为,现阶段的投资人除了要盯紧自己的平台之外,对于平台出现的一些问题,更要第一时间仔细的分析,判断出情况是否严重,然后做出正确的决策。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">下面互金天地会就来列举一下,现在的平台一般会出现哪些问题,以及如何判断是否严重。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">1、不要轻信纯谣言</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">很多人现在把平台出现谣言也当作是大问题,认为谣言是引起平台挤兑的罪魁祸首,其实不然。很多所谓的预警和爆料,不是马后炮就是纯靠蒙,甚至还会有不少纯谣言,目的不是为了提示风险,而是为了造成投资人恐慌,这样才会真正影响到平台。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">所以投资人不能轻易被人给利用,如果确定是纯谣言,根本无需多理会。纯谣言都是一些标题党,不是说平台人去楼空,就是说平台已经大面积逾期,遇到这种情况时,只需要直接找平台客服核实,或者去平台官方论坛和官方群看看其他投资人的反应,即可马上破除谣言。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2、对于回款和提现出现延迟的平台,要先看是否在规则之内</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">现在的投资人对于平台回款和提现的时间很在意,一旦出现延迟的情况,就会非常担心,甚至直接以为平台要雷了。这时候就要根据规则来判断了,有些平台在规则中没有明确写出退出时间,也给出了逾期后的具体处理方案的话,就说明都是在规则范围内,并不能算是平台出现了问题。反之,如果是明确违反了规则,自己打自己脸的话,就说明情况比较严重了,最好直接去当场找平台质问,弄清楚问题的严重性。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">3、要掌握好平台的动向,要搞清楚到底是利好还是在甩锅</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">最近很多平台真是进退两难,搞的动作过大,容易被质疑;不搞任何动作,又等同于坐以待毙。比如最近很常见的加息活动,对于投资人而言其实是利好,说明平台在采取具体措施挽回人气,行情不好还不搞活动,那样的平台才是真的作死。另外有些平台的实际控制人和大股东频频发声,公开表示对平台负责到底,甚至直接变更工商以示决心,对于投资人而言都算是大利好。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">当然也有些不老实的平台暗地里甩锅,随时准备放弃抵抗。比如法人股东偷偷变更,而且不给出任何原因;风投不认账,宣传投了几千万,出现逾期了才说只有几万;更有些股东平时频频露面站台拉客,有问题了才说只是财务投资,不参与运营等荒唐借口提前甩锅。一旦出现这类情况,就说明平台内部情况已经很恶劣了,投资人需要格外警惕。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">4、对于已经出问题的平台,要看后续的态度和处理的效率</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">对于已经自己发了公告,公开表明出现了问题,无法正常提现的平台而言,投资人要根据后续的表现,来决定是给平台时间,还是马上报警维权。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">平台后续运营是否有条有序,分期兑付计划能否顺利进行,有没有甩锅和变卦等行为,法人和高层是否可以随时直面投资人,平台是否有具体提升催收和处理资产的进度等等,都是可以作为参考的具体标准。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">总结:</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">我认为,能坚持到现在的平台,大多都不会轻易放弃,就算是已经出现了问题的平台,性质也不会像之前那么恶劣。投资人要根据自己的判断,来决定是给平台时间,还是做最坏的打算来处理。</p><p><br/></p>', '1535081909', '网贷之家', '0', '1');
INSERT INTO `jyz_article` VALUES ('18', '肖飒:出借人能向P2P股东追偿吗?', 'P2P股东追偿,P2P出借人', '近日,有从业者在某平台雷”了,打电话来询问,十项举措应对网贷风险”第四条里已推出机构依据破产法、公司法及有关监管要求制定清盘对付方案,股东依法负连带责任”,那么,出借人如何开启追偿?就这一问题,我们简要回应,仅作参考。', '', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">近日,有从业者在某平台雷”了,打电话来询问,十项举措应对网贷风险”第四条里已推出机构依据破产法、公司法及有关监管要求制定清盘对付方案,股东依法负连带责任”,那么,出借人如何开启追偿?就这一问题,我们简要回应,仅作参考。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">1守住原则,看清例外</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">既然要依法”处置,我们必须尊重法律原则。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">公司制度的设立,本身就是要把自然人或组织在商业行为中的风险规避到最小,起码不会影响出资人自身的财产和人身安全。因此,在我国法律项下,股东对其所投资的企业不承担连带责任是大原则,毋庸置疑。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">有原则,就有例外。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">股东对其所投资的企业承担赔偿责任的情形有限,实践中,存在于其入股时出资不实”,这种情况下,一旦平台面临倒闭风险,债权人可以要求股东依法补足出资。以这部分补足的资金,作为给付债权人的来源。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">同时,自2017年10月1日,我国《民法总则》对于单方允诺行为进行肯定。也就是说,如果股东在企业设立时或者企业存续期间,发出单方面的承诺:对于平台上的债权债务关系承担连带责任,那么,此言一出,驷马难追,股东就要遵守承诺,一一兑现。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2财务投资还是参与管理?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">我们团队处理了大量网贷刑事案件,其中,股东的法律角色到底是证人还是共犯?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">取决于,其是否明知平台非吸而提供帮助。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">如上标准,在司法实践中会细化,倘若仅为网贷平台的财务投资者,不参与实际经营,只需要股东方负责人+法务总监到涉案警队做证即可,没有刑事法律风险。如若股东方委派了董事,甚至指派了总经理实际经营,要想洗脱没有参与经营,对决策不明的嫌疑,将十分困难。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">看到这里,互金圈的老人也明白了,为什么三四年前,飒姐极力反对一些财务投资的优质公司安插管理、财务人员到其投资的网贷企业。这都是为了防范刑事风险筑起的防线,有些人没有听劝,还是采取投资传统产业的模式,紧紧抓住企业命脉,这种做法无疑是不明智的。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">如果,后续这些投资集团放眼区块链项目,请一定要记住这个法律教训,只投资不管理。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">3出借人,追偿方式的选择?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">出借人个体面临的选择很窄,但出借人整体面临的选择很宽。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第一个层面的选择是:让平台活着,还是让平台死去?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">别怀疑,出借人有这样的能量。与金融市场不同,网贷行业并非零和博弈”,出借人赚取的利息,在合法经营的网贷业务中,并非其他出借人的本金而是借款企业支付的利息。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">既然如此,如果大家的共识是让平台活着,那么,对于真正用款的企业,我们决不能允许逃废债”,坚决拿起法律的武器,到合同约定的管辖法院,对企业及其法定代表人进行诉讼,胜诉率较高,然后,盯紧执行,争取早日回款。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第二个层面的选择是:让平台立刻崩盘,还是缓缓退出?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">要想让平台顷刻之间崩盘,只需高喊刚性兑付”,全世界任何一个金融机构或类金融机构都恐惧这一点。兑付期限还没到,也要兑付。无所不用其极,催平台放血,如果是合规平台,他们根本没有资金池子可以缓释流动性;如果是不合规平台,一天净流出几个亿也撑不了多久。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">理性考量,只要平台实际控制人没跑路,愿意继续追用款企业,愿意继续协助处置资产,经过出借人群体同意,可以给予一定期限的宽展期。目前市场比较流行的是24个月-36个月,一般还有实际控制人的股权等作质押。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">第三个层面的选择是:非法吸收公众存款还是集资诈骗?</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">刑法第176条和第192条的构成要件只差一个主观因素,但刑期却是天壤之别,前者十年以下,后则破亿金额一般会判十年以上至无期。其实,出借人对于老板判什么罪名,多少年不是那么关心,更关心的还是返还资金是多少。既然如此,可以选派代表与嫌疑人的辩护律师沟通,如果达成和解,争取十年以下量刑,多数律师愿意说服嫌疑人及其家属多拿出一些资产、资金偿还投资人。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">这三个层面是按照一般网贷事件发展的规律,做了总结,各方可以参考取用,切勿非理性维权,也不要有过激言行。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">4写在最后...</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">法律不能书生气。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">法律是一门实践的学问,我们必须运用到司法实践的一线去,检验她,逐步完善她。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">我们相信,网贷企业的股东也是有社会责任感的群体,在平台出现困难时、出借人出现困顿时,股东应该依法承担一定责任。但是,法律的原则不能撼动,作为法律人作者必须捍卫法律尊严。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">同时,我们知道各方的压力巨大,也积极寻找化解之道。出借人对于网贷平台出现逾期、退出等情况,要有理性的判断、合理的预期。我们从司法实践中总结了三个层次的选择,请出借人组织进行理性选择。</p><p><br/></p>', '1535082569', '网贷之家', '0', '1');
INSERT INTO `jyz_article` VALUES ('19', '马云:不能因P2P出事就否定互联网金融的前途', '马云,互联网金融', '在今天上午的(8月23日)中国国际智能产业博览会上,阿里巴巴集团董事会主席马云在主题演讲时指出,他自己不支持比特币,但相信区块链不全是比特币。“就像P2P不全是互联网金融,P2P出问题是迟早的事儿,但不能因此否定互联网金融的前途。”', 'http://192.168.80.145/jphp/jyzblog/storage/app/photo/20180824115108557.jpg', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">在今天上午的(8月23日)中国国际智能产业博览会上,阿里巴巴集团董事会主席马云在主题演讲时指出,没有电子商务,很多传统企业的股票会非常难看。马云认为,未来将没有纯制造业,也没有纯服务业,未来的制造业一定是服务业,服务业也必须是制造业,未来的制造业不是标准化和规模化,而是个性化、定制化、智能化。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\"><img alt=\"\" src=\"/ueditor/php/upload/image/20180824/1535082639.jpg\"/></p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">他说:“未来不一定是传统的实体经济,但一定是以拥抱互联网、拥抱智能化、拥抱新技术的新实体,实体经济和互联网以后谁也离不开谁,未来90%的零售额将在互联网上,90%的制造业会在互联网上”。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">马云还提到了区块链。他表示,自己不支持比特币,但相信区块链不全是比特币。“就像P2P不全是互联网金融,P2P出问题是迟早的事儿,但不能因此否定互联网金融的前途。”</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">以下内容摘自马云演讲:</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">全球这两年有非常密集的关于互联网未来的论坛和会议,恰恰说明了技术变革之快,智能化的影响之多,所以行业经常聚在一起探讨思考这些问题,本身就是我们进步的关键。刚才大家发表了很多关于智能制造的问题和看法,我觉得有非常丰富的内容,我坐在下面不断调整自己要讲的东西,我想从我的角度来谈一下我的思考。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">首先,我认为这次技术革命所带来的变化远远超过我们的想象。未来30年智能技术将深入到社会的方方面面,改变传统制造业、服务业,改变教育、医疗,我们所有的生活都是离不开智能制造。未来不是我们这些互联网公司的天下,而是用好互联网公司、用好智能技术公司的天下。我自己这么觉得,新零售以后最重要的是新制造,所以大家觉得你今天来又要提新概念,其实说实在,新零售、新制造、新技术、新能源、新金融,我实在也找不出一个字来,什么是最好的字来形容它,我就用了一个新。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">其实新零售在重新定义零售,新制造必将重新定义新的制造,新制造必须是制造业和服务业的完美结合,新制造也必须是B2C走向C2B,安心定制个性化,也必须是实体经济和虚拟经济的完美结合。今天的外部环境下,传统的靠资源、消耗型的企业必定会越来越艰难,挑战也越来越大。今天活得不错的传统制造业,不管是大家讲的美的也好、格力也好、海尔也好,其实都是把传统制造业和互联网营销做了很好的结合,因为电商的发展,因为新零售的发展,使得他们销售非常好,数字至少看起来很好。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">我经常听见没了制造业,哪来你们互联网的零售?哪来电子商务?其实没有电子商务,这些人的股票会非常难看,根本没有销售额。所以我希望所有制造业要保持高度的清醒认识,不能安于现状,光靠互联网的营销今天带动了销售额,但不能代表自己的能力,必须思考未来制造业该如何做。中国制造业必须真正走向智能化,我们必须要从B2C走向C2B,必须要利用好大数据、云计算、物联网去实现按需定制。跟互联网结合起来,跟市场结合起来跟智能制造结合起来,去围绕着消费走,这是中国制造业改变的关键一步。今天制造业活得好的不能安于现状,活得不好的更要改变自己,抓住未来的机会。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">新制造是制造业和服务业的完美结合,未来将没有纯制造业,也没有纯服务业,未来的制造业一定是服务业。服务业也必须是制造业,未来的制造业不是标准化和规模化,而是个性化、定制化、智能化。以前是以制造为中心,未来应该以创造为中心,未来的制造业不提供就业,制造业在未来不将成为就业的主要发动机,人工智能也好、机器人也好,确实会取代大量就业。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">机器人会取代流水线上的很多工作,但是服务业会产生新的大量的岗位,因为制造业需要人来设计、需要体验、需要创新,所以未来制造业的引擎不是制造业,未来制造业的引擎是现代服务业。新制造也是实体经济和虚拟经济的完美结合,未来不一定是传统的实体经济,但一定是以拥抱互联网、拥抱智能化、拥抱新技术的新实体,实体经济和互联网以后谁也离不开谁,未来90%的零售额将在互联网上,90%的制造业会在互联网上。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">另外,新制造是新经济转型的新动力,智能技术是新制造不可逾越的关键技术。全世界都在争夺未来的人才和技术,美国在过去20年基本完成了经济转型,中国正在进行供给侧的改革,推进“一带一路”,转型的关键在于技术、在于思想、在于境界和格局。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">未来有三项核心技术:智能制造、IT、区块链。数据是新制造的关键要素,而用好数据是智能技术的能力,是走向智能化不可逾越的关口。智能技术会在新制造中扮演越来越重要的角色。IOT和区块链技术正在推进互联网本身发生巨大的变化,今天的IOT不是真正意义上的IOT,我认为是很多卖硬件或者卖软件的人找个理由卖得更好而已。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">最后,机器有智能,动物有本能,人类有智慧。我们要相信智能的力量、智慧的力量,但是改变世界的不是技术,而是技术背后的理想、梦想;引领未来的不是智能,而是智能背后人的智慧。我相信机器会变得比人聪明,但人比机器更智慧,人类拥有的智慧是机器永远无法获得的,聪明是我们知道自己要什么,而智慧是知道自己不要什么,机器可以更聪明,可以快速、可以更精准,但机器不可能有价值观、不可能有梦想、不可能有爱,因为机器只有机心、芯片,而人类有爱心。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">人机大战本身就是个笑话,我自己这么觉得,围棋是人与人之间的乐趣,围棋不是人与机器之间自寻倒霉。而且刚才讲机器会翻译得比人好,但翻译得再好的机器不可能让人体验语言的魅力,体验异域的文化和精髓,所以人类一定要有足够的自信,即使技术是一个必要的要素,但不是一个唯一的要素,更不是全部的条件,我们不是为了技术而技术,我们要解决社会问题、解决未来问题,而去追求技术。我们尊重技术,但没有必要为技术担心太多,只有那些不学习、不自信的人才会担心未来、才会担心这些东西。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">所以,我相信大家现在开始担心AI、担心人工智能,担心这些机器人会消灭大量就业,但这些也会创造未来更多、更新的就业。所以,我希望大家知道,我们做不到我们的孩子们能做到,今天做不到未来能做到,要相信人类的智慧,我们一定能够做到未来。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">我想最后讲一下关于今天大家在谈技术的时候,更要考虑这种新的生产力,必须建立新的生产关系去适应这样的生产力。过去英国曾经有过红旗法案,今天世界很多国家和政府都在制定各种各样、各种包装下面的红旗法案,但今天我们要明白一个道理,我们必须要建立新的生产关系去适应新的生产力发展。</p><p><span style=\"color: rgb(102, 102, 102); font-family: "Microsoft Yahei", arial, sans-serif; background-color: rgb(255, 255, 255);\">我去年跟美国交通部长探讨过关于无人驾驶,有人讲无人驾驶会取代很多就业,但是美国政府应该关心取代旧的行业推进新的行业,还是应该关心什么?我的看法政府应该关心的是,不管是无人驾驶还是有人驾驶,社会安全、马路安全是第一要素,至于这个行业把那个行业给打掉了,这是一个市场要素,政府不应该在这儿多管,而应该关心到驾驶本身的安全。所以我自己觉得,企业做好企业的事情、政府做好政府的事情,共同来打造一个美好的未来,才是我们今天探讨这样一个问题的必要所在。</span></p><p><br/></p>', '1535082668', '网贷之家', '0', '1');
INSERT INTO `jyz_article` VALUES ('20', '农商行不良贷款率飙升 银行慌了、政府帮要钱', '农商行不良贷款,农商行贷款', '今年以来,农商行频频被曝出10%以上的不良率,引发外界对于农商行资产质量的担忧,在此背景下,清收不良贷款自然成为不少农商行下半年工作的重点之一。为了全力清收不良贷款,各个农商行可谓使出浑身解数各出奇招,有的是政府出面帮要钱,有的采取“法银联动”,通过法院诉讼执行等方式加大清收力度,有的采取清收与盘活并重。', '', '<p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">今年以来,农商行频频被曝出10%以上的不良率,引发外界对于农商行资产质量的担忧,在此背景下,清收不良贷款自然成为不少农商行下半年工作的重点之一。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">由于农商行贷款多投向小微企业和涉农客户,两者均超出农商行贷款总额的50%,这部分贷款在经济下行周期更容易成为坏账。再加上农商行经营区域高度集中、风险较难分散,因此,不良率波动更大,不良率见顶的时间也更长。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">为了全力清收不良贷款,各个农商行可谓使出浑身解数各出奇招。有的是政府出面帮要钱,比如山西侯马农商行、山东威海农商行等;有的采取“法银联动”,通过法院诉讼执行等方式加大清收力度,比如祁阳农商银行、东平农商银行等;有的采取清收与盘活并重,比如山东寿光农商行等。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">“目前经济形势欠佳,确实有部分借款人经营暂时困难还不上贷款,对此我们积极寻求新的不良处置途径,运用了‘借新还旧+赋强公证’业务模式,既为客户省去了‘倒贷’的麻烦,又可以有效防范风险。”山东寿光农商行工作人员对《华夏时报》记者表示。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">据记者了解,不少农商行明确将不良贷款清收工作定为“攻坚战”“保卫战”,足见银行的重视程度。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">据本报记者了解,湖南省湘西自治州农商行在2018半年度工作会议上就明确指出,要严防死守不良贷款反弹,全力开展“压不良控风险”活动。要重点加大到期贷款收回率、不良贷款率管理,坚决不能突破不良率5%、到期收回率98%的“两条”红线。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">政府出面帮要钱</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">山西侯马农商行2017年不良贷款率高达26.28%,河南修武农商行2017年不良贷款率为20.74%,贵阳农商行不良贷款率从2016年末的4.13%猛增至2017年末的19.54%……近期,因资产质量下滑、不良贷款率高企,部分农商行被推向舆论的“风口浪尖”。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">中国银行保险监督管理委员会8月13日发布的2018年二季度银行业主要监管指标数据显示,农商行的不良贷款率上升幅度明显,由一季度末的3.26%上升到二季度末的4.29%。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">目前,监管部门明确要求,逾期90天以上的贷款要全部计入不良贷款。对此经济学家宋清辉认为,当前监管强化不良贷款认定的根本目的仍是防控金融风险,加速核销,“不良贷款若一直藏匿,风险更容易爆发”。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">正因为此,农商行不良率飙升在今年上半年集中显现,而不良率的飙升不但给农商行带来了重大影响,也引起了地方政府的关注。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">2017年8月,针对山西侯马农商行高达26.28%的不良率,侯马市召开处置不良贷款专项行动会议。为帮助侯马农商行做好不良贷款清收处置工作,该市成立清收处置侯马农商行不良贷款专项行动协调小组,组长由市委副书记、市长段慧刚担任。这次专项行动要求侯马农商行的所有不良贷款,要做到应收尽收。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">无独有偶。8月8日,汨罗市召开清收农商银行不良贷款工作动员部署会,会议明确,在全市范围内全面开展农商银行不良贷款清收工作,确保3年内全面清收不良贷款。市委常委、常务副市长林治学,市委常委、副市长陈双全等参加会议。会议明确指出,汨罗市农商银行挂牌一年多,不良贷款成为阻碍可持续发展的“绊脚石”。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">山东威海农商行在回复《华夏时报》记者的采访函中也表示,该行正在全力清收处置存量不良贷款。所采取的办法除了实行不良处置高管包干制度之外,还特别加大了与政府、司法的沟通协调,就加快企业破产重整进程、打击逃废债务等工作,多次向政府专题汇报争取。政府部门也高度重视,现已专门出台政策推进相关工作,预计2年内基本消化解决存量风险。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">银行各出奇招</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">今年以来,银保监会及各地银监局加强了对不良贷款的处置监管力度,处罚银行违规处置不良贷款,山东聊城润昌农商银行、湖南江华农商银行等多家农商行因“虚假转让不良贷款”或“违规核销不良贷款”被重罚。因此,下半年各个农商行均着力在法律允许范围内,对不良贷款核销,其中清收便是重要手段之一。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">为了加快不良贷款的清收,各个农商行可谓奇招频出。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">近日,台前农商银行后方支行通过拍卖借款人手机号的方式收回了部分不良贷款,这也是该行在清收不良上的一次探索和尝试。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">据了解,借款人李某因经营化妆品生意,于2016年1月在后方支行申请了贷款,却因经营不善导致亏损并形成不良。借款人在贷款逾期后,拒绝偿还债务,工作人员多次上门清收也一无所获。该行员工在后期整理信贷资料时发现借款人尾号为“3333”的手机号具有一定价值,遂向台前县人民法院提起诉讼,并对手机号进行拍卖,获得拍卖价款2.7万元。该款项将全部用于偿还此笔贷款。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">山东寿光农商行采取的方式则是向清收与盘活并重。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">该行工作人员对本报记者表示,对于配合处置工作但暂时经营困难的借款人,他们通过办理收回再贷、借新还旧继续提供信贷支持,帮助其延续信用;而对于不配合处置工作的借款人,通过法院诉讼执行等方式加大清收力度。此外,他们还成立了“风险防控化解小组”,对于各单位在清收处置过程遇到的联保类贷款拆分、特殊贷款盘活等问题,由“风险防控化解小组”当日召开会议研究当日解决问题。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">记者采访发现,转变清收理念、创新清收手段、成立催收团队,为了清收不良贷款各个农商行可谓费尽心思。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">尧都农商银行为了全面清收不良贷款,采用 “早堵、晚等、饭时找”的方法紧盯贷户,一次不行,两次,两次不行三次……多次上门清收,还替贷户制定还贷计划。该行号召全体员工发扬捡芝麻的精神,争取实现“户户不空笔笔动”的目标。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">日前,人民银行召开的2018年下半年工作电视会议上,明确提出今年下半年要积极稳妥防范化解金融风险,把防范化解金融风险和服务实体经济更好结合起来。</p><p style=\"margin-top: 0px; margin-bottom: 20px; padding: 0px; text-indent: 2em; color: rgb(102, 102, 102); line-height: 2.2; font-family: "Microsoft Yahei", arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);\">不过在业内人士看来,我国农商行和农信社数量高达2000多家,而暴露风险的银行数量占比很小,因此农商行整体风险可控,也不会造成系统性风险。</p><p><br/></p>', '1535082732', '网贷之家', '0', '1');
-- ----------------------------
-- Table structure for `jyz_category`
-- ----------------------------
DROP TABLE IF EXISTS `jyz_category`;
CREATE TABLE `jyz_category` (
`cat_id` int(11) NOT NULL AUTO_INCREMENT,
`cat_name` varchar(50) DEFAULT NULL,
`cat_pid` int(11) NOT NULL DEFAULT '0',
`cat_view` int(11) DEFAULT '0' COMMENT '访问次数',
`cat_keyword` varchar(255) DEFAULT NULL,
`cat_description` varchar(255) DEFAULT NULL,
`cat_order` int(11) DEFAULT '0',
PRIMARY KEY (`cat_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='文章分类';
-- ----------------------------
-- Records of jyz_category
-- ----------------------------
INSERT INTO `jyz_category` VALUES ('1', '新闻', '0', '0', '娱乐新闻,军事新闻', null, '1');
INSERT INTO `jyz_category` VALUES ('2', '体育', '0', '0', null, null, '2');
INSERT INTO `jyz_category` VALUES ('3', '娱乐', '0', '0', null, null, '3');
INSERT INTO `jyz_category` VALUES ('4', '军事新闻', '1', '0', '军事新闻,新闻', null, '0');
INSERT INTO `jyz_category` VALUES ('5', '热点新闻', '1', '0', null, null, '0');
INSERT INTO `jyz_category` VALUES ('6', '腾讯体育', '2', '0', null, null, '10');
INSERT INTO `jyz_category` VALUES ('7', '乐视体育', '2', '0', null, null, '5');
INSERT INTO `jyz_category` VALUES ('8', '体育彩票', '2', '0', null, null, '0');
INSERT INTO `jyz_category` VALUES ('9', '娱乐新闻', '3', '0', null, null, '3');
|
\c pg_db
---------------
-- SCHEMA: Create Schema
-- works in Hobby
---------------
CREATE SCHEMA if not exists base_0_0_1;
CREATE SCHEMA if not exists api_0_0_1;
|
<gh_stars>0
-- github.com/CodeNameKND14
SELECT concat(name, '(', substr(occcupation, 1, 1), ')')
FROM occupations
ORDER BY name ASC;
SELECT concat('There are a total of ', count(1) ' ', lower(occupation), 's.')
FROM occupations
GROUP BY occupations
ORDER BY count(1) ASC, occupation asc;
|
/*
21. Write SQL statements to delete some of the records from the Users and Groups tables.
*/
DELETE FROM Users
WHERE [Password] = '<PASSWORD>'
DELETE FROM Groups
WHERE [Name] = 'Ailqk' |
<filename>open_datasets/mta_busstops/after.sql
DROP TABLE IF EXISTS mta_busstops;
CREATE TABLE mta_busstops AS
SELECT * FROM manhattanstops
UNION ALL
SELECT * FROM bronxstops
UNION ALL
SELECT * FROM queensstops
UNION ALL
SELECT * FROM brooklynstops
UNION ALL
SELECT * FROM statenislandstops
UNION ALL
SELECT * FROM buscostops;
DROP TABLE manhattanstops;
DROP TABLE bronxstops;
DROP TABLE brooklynstops;
DROP TABLE statenislandstops;
DROP TABLE buscostops;
ALTER TABLE mta_busstops RENAME COLUMN wkb_geometry TO geom; |
<filename>datastore/migrations/0036_actions_on_object.down.sql
DROP PROCEDURE get_user_actions_on_object;
|
-- -------- << Trabalho Final >> ------------ --
-- --
-- SCRIPT DE CRIACAO (DDL) --
-- --
-- Data Criacao ..........: 31/03/2019 --
-- Autor(es) .............: Guilherme --
-- Banco de Dados ........: MySQL --
-- Base de Dados(nome) ...: iscool --
-- --
-- Data Ultima Alteracao ..: 31/03/2019 --
-- + Gerar script completo --
-- + 12 tabelas --
-- + cria e seleciona a base iscool --
-- ----------------------------------------------------------------- --
create database if not exists iscool;
use iscool;
CREATE TABLE Prova (
id_prova int(10) PRIMARY KEY,
nome_prova varchar(255),
desc_prova text,
margem_prova int(2),
fonte_prova int(2),
data_criacao_prova date,
data_aplicacao_prova date,
id_professor int(10)
);
CREATE TABLE Aluno (
id_aluno int(10) PRIMARY KEY,
nome_aluno varchar(255)
);
CREATE TABLE gaba_tem_questoes (
id_gabarito int(10),
id_questao int(10)
);
CREATE TABLE questao_tem_habilidade (
id_questao int(10),
id_habilidade int(10)
);
CREATE TABLE Habilidade (
id_habilidade int(10) PRIMARY KEY,
nome_habilidade text,
id_competencia int(10)
);
CREATE TABLE Competencia (
id_competencia int(10) PRIMARY KEY,
desc_competencia text
);
CREATE TABLE disciplinas_tem_compe (
id_competencia int(10),
id_disciplina int(10),
FOREIGN KEY(id_competencia) REFERENCES Competencia (id_competencia) ON UPDATE CASCADE ON DELETE RESTRICT
);
CREATE TABLE Disciplina (
id_disciplina int(10) PRIMARY KEY,
nome_disciplina varchar(255)
);
CREATE TABLE Alternativa (
id_alternativa int(10) PRIMARY KEY,
veracidade varchar(1),
desc_alternativa varchar(1000),
id_questao int(10)
);
CREATE TABLE Questao (
id_questao int(10) PRIMARY KEY,
img_questao blob,
texto_questao text,
desc_questao text,
letra_alternativa char(1),
marcada boolean,
id_prova int(10),
id_disciplina int(10),
id_professor int(10),
FOREIGN KEY(id_prova) REFERENCES Prova (id_prova) ON UPDATE CASCADE ON DELETE RESTRICT,
FOREIGN KEY(id_disciplina) REFERENCES Disciplina (id_disciplina) ON UPDATE CASCADE ON DELETE RESTRICT
);
CREATE TABLE Gabarito (
id_gabarito int(10) PRIMARY KEY,
img_gabarito blob,
id_aluno int(10),
id_prova int(10),
FOREIGN KEY(id_aluno) REFERENCES Aluno (id_aluno) ON UPDATE CASCADE ON DELETE RESTRICT,
FOREIGN KEY(id_prova) REFERENCES Prova (id_prova) ON UPDATE CASCADE ON DELETE RESTRICT
);
CREATE TABLE Professor (
id_professor int(10) PRIMARY KEY,
login_professor varchar(20),
senha_professor varchar(20),
nome_professor varchar(255),
email_professor varchar(255),
coordenador_professor boolean
);
ALTER TABLE Prova ADD FOREIGN KEY(id_professor) REFERENCES Professor (id_professor) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE gaba_tem_questoes ADD FOREIGN KEY(id_gabarito) REFERENCES Gabarito (id_gabarito) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE gaba_tem_questoes ADD FOREIGN KEY(id_questao) REFERENCES Questao (id_questao) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE questao_tem_habilidade ADD FOREIGN KEY(id_questao) REFERENCES Questao (id_questao) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE questao_tem_habilidade ADD FOREIGN KEY(id_habilidade) REFERENCES Habilidade (id_habilidade) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE Habilidade ADD FOREIGN KEY(id_competencia) REFERENCES Competencia (id_competencia) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE disciplinas_tem_compe ADD FOREIGN KEY(id_disciplina) REFERENCES Disciplina (id_disciplina) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE Alternativa ADD FOREIGN KEY(id_questao) REFERENCES Questao (id_questao) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE Questao ADD FOREIGN KEY(id_professor) REFERENCES Professor (id_professor) ON UPDATE CASCADE ON DELETE RESTRICT;
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 30 Agu 2020 pada 15.55
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.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 */;
--
-- Database: `db_pam`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `company`
--
CREATE TABLE `company` (
`id` int(2) NOT NULL,
`name` varchar(100) NOT NULL,
`author` varchar(250) NOT NULL,
`address` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `company`
--
INSERT INTO `company` (`id`, `name`, `author`, `address`) VALUES
(1, 'Nama Perusahaan', 'Payment PAM', NULL);
-- --------------------------------------------------------
--
-- Struktur dari tabel `user`
--
CREATE TABLE `user` (
`id` int(11) NOT NULL,
`name` varchar(128) NOT NULL,
`email` varchar(128) NOT NULL,
`image` varchar(128) NOT NULL,
`password` varchar(256) NOT NULL,
`role_id` int(11) NOT NULL,
`is_active` int(1) NOT NULL,
`date_created` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data untuk tabel `user`
--
INSERT INTO `user` (`id`, `name`, `email`, `image`, `password`, `role_id`, `is_active`, `date_created`) VALUES
(5, 'Administrator', '<EMAIL>', '16363.png', '$2y$10$54/GQHh4xmvOFts7rzjUQuULRcUbp3LYz1KOkWYK6M6JJ2TbOeLQO', 1, 1, 1552120289),
(17, 'User', '<EMAIL>', '16363.png', '$2y$10$vSRWhgyTXmSAPGhrqpl/gemaS6e5YPhuVxnHarrdXuf2w0zRG/Kt.', 2, 1, 1598629749);
-- --------------------------------------------------------
--
-- Struktur dari tabel `user_access_menu`
--
CREATE TABLE `user_access_menu` (
`id` int(11) NOT NULL,
`role_id` int(11) NOT NULL,
`menu_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data untuk tabel `user_access_menu`
--
INSERT INTO `user_access_menu` (`id`, `role_id`, `menu_id`) VALUES
(1, 1, 1),
(3, 2, 2),
(7, 1, 3),
(8, 1, 2),
(10, 2, 5);
-- --------------------------------------------------------
--
-- Struktur dari tabel `user_menu`
--
CREATE TABLE `user_menu` (
`id` int(11) NOT NULL,
`menu` varchar(128) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data untuk tabel `user_menu`
--
INSERT INTO `user_menu` (`id`, `menu`) VALUES
(1, 'Admin'),
(3, 'Menu'),
(5, 'User');
-- --------------------------------------------------------
--
-- Struktur dari tabel `user_role`
--
CREATE TABLE `user_role` (
`id` int(11) NOT NULL,
`role` varchar(128) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data untuk tabel `user_role`
--
INSERT INTO `user_role` (`id`, `role`) VALUES
(1, 'Administrator'),
(2, 'Member');
-- --------------------------------------------------------
--
-- Struktur dari tabel `user_sub_menu`
--
CREATE TABLE `user_sub_menu` (
`id` int(11) NOT NULL,
`menu_id` int(11) NOT NULL,
`title` varchar(128) NOT NULL,
`url` varchar(128) NOT NULL,
`icon` varchar(128) NOT NULL,
`is_active` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data untuk tabel `user_sub_menu`
--
INSERT INTO `user_sub_menu` (`id`, `menu_id`, `title`, `url`, `icon`, `is_active`) VALUES
(1, 1, 'Dashboard', 'admin', 'fas fa-fw fa-tachometer-alt', 1),
(4, 3, 'Menu Management', 'menu', 'fas fa-fw fa-folder', 1),
(5, 3, 'Submenu Management', 'menu/submenu', 'fas fa-fw fa-folder-open', 1),
(7, 1, 'Role', 'admin/role', 'fas fa-fw fa-user-tie', 1),
(9, 5, 'Info Tagihan', 'member', 'fas fa-users', 1),
(10, 5, 'Info Keluhan', 'member/keluhan', 'fas fa-users', 1),
(11, 5, 'Simulasi Tagihan', 'member/simulasi', 'fas fa-users', 1),
(12, 5, 'Pendaftaran', 'member/register', 'fas fa-users', 1),
(13, 5, 'Profile Perusahaan', 'member/profile', 'fas fa-users', 1),
(14, 5, 'Berita', 'member/berita', 'fas fa-users', 1),
(15, 1, 'User Management', 'user/list', 'fas fa-users', 1),
(16, 1, 'Company Profile', 'admin/company', 'fas fa-users', 1);
-- --------------------------------------------------------
--
-- Struktur dari tabel `user_token`
--
CREATE TABLE `user_token` (
`id` int(11) NOT NULL,
`email` varchar(128) NOT NULL,
`token` varchar(128) NOT NULL,
`date_created` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `company`
--
ALTER TABLE `company`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `user_access_menu`
--
ALTER TABLE `user_access_menu`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `user_menu`
--
ALTER TABLE `user_menu`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `user_role`
--
ALTER TABLE `user_role`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `user_sub_menu`
--
ALTER TABLE `user_sub_menu`
ADD PRIMARY KEY (`id`);
--
-- Indeks untuk tabel `user_token`
--
ALTER TABLE `user_token`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT untuk tabel yang dibuang
--
--
-- AUTO_INCREMENT untuk tabel `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
--
-- AUTO_INCREMENT untuk tabel `user_access_menu`
--
ALTER TABLE `user_access_menu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT untuk tabel `user_menu`
--
ALTER TABLE `user_menu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT untuk tabel `user_role`
--
ALTER TABLE `user_role`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT untuk tabel `user_sub_menu`
--
ALTER TABLE `user_sub_menu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT untuk tabel `user_token`
--
ALTER TABLE `user_token`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*[[Show Nls_Database_Parameters]]*/
SELECT parameter,a.VALUE database_value,c.value instance_value,b.value session_value
from Nls_Database_Parameters a
full JOIN NLS_SESSION_PARAMETERS b USING(PARAMETER)
full JOIN NLS_INSTANCE_PARAMETERS c USING(PARAMETER) order by 1 |
insert into SYS_Menu values('Url_CheckFlowList_View','物流路线检查','Menu.Inventory.Setup',400,'物流路线检查','~/ItemFlow/CheckFlowList','~/Content/Images/Nav/Default.png',1)
go
insert into ACC_Permission values('Url_CheckFlowList_View','物流路线检查','Inventory')
go
insert into ACC_Permission values('Url_PickList_New_button','拣货单新建-按钮','Distribution')
go
update ACC_Permission set Desc1='拣货单新建-查看' where code='Url_PickList_New'
go
update ACC_Permission set Desc1='拣货单新建-新建' where code='Url_PickList_New_button' |
--
-- pgwt.cookie_parse()
--
--------------------------------------------------------------------------------
CREATE FUNCTION pgwt.cookie_parse(text)
RETURNS hstore
LANGUAGE sql
IMMUTABLE
AS $function$
--
-- Parse http cookie header
--
SELECT COALESCE(hstore(array_agg(r[1]), array_agg(r[2])), ''::hstore)
FROM (
SELECT regexp_matches(s, '^(.*)=(.*)$') r
FROM regexp_split_to_table($1, '\s*;\s*') s
) foo;
$function$;
--------------------------------------------------------------------------------
|
INSERT INTO blsoccupationhandbook (current_year,current_year_agg,last_updated,occupation_id,occupation_citation,occupation_description_type,occupation_description,occupation_how_to_become_one_section_body_type,occupation_how_to_become_one_section_body,occupation_how_to_become_one_section_image_type,occupation_how_to_become_one_section_image,occupation_how_to_become_one_section_title_type,occupation_how_to_become_one_section_title,occupation_image_type,occupation_image,occupation_job_outlook_section_body_type,occupation_job_outlook_section_body,occupation_job_outlook_section_chart_type,occupation_job_outlook_section_chart,occupation_job_outlook_section_datatable_type,occupation_job_outlook_section_datatable,occupation_job_outlook_section_title_type,occupation_job_outlook_section_title,occupation_more_information_section_body_type,occupation_more_information_section_body,occupation_more_information_section_title_type,occupation_more_information_section_title,occupation_occupation_code,occupation_occupation_name_full_type,occupation_occupation_name_full,occupation_occupation_name_short_plural_type,occupation_occupation_name_short_plural,occupation_occupation_name_short_singular_type,occupation_occupation_name_short_singular,occupation_pay_section_body_type,occupation_pay_section_body,occupation_pay_section_chart_html_type,occupation_pay_section_chart_html,occupation_pay_section_title_type,occupation_pay_section_title,occupation_publish_date_format,occupation_publish_date_type,occupation_publish_date,occupation_publish_time_format,occupation_publish_time_note,occupation_publish_time_type,occupation_publish_time,occupation_quick_facts_qf_employment_openings_help_type,occupation_quick_facts_qf_employment_openings_help,occupation_quick_facts_qf_employment_openings_value_type,occupation_quick_facts_qf_employment_openings_value,occupation_quick_facts_qf_employment_openings_value_agg,occupation_quick_facts_qf_employment_outlook_description,occupation_quick_facts_qf_employment_outlook_help_type,occupation_quick_facts_qf_employment_outlook_help,occupation_quick_facts_qf_employment_outlook_range_type,occupation_quick_facts_qf_employment_outlook_range,occupation_quick_facts_qf_employment_outlook_value_type,occupation_quick_facts_qf_employment_outlook_value,occupation_quick_facts_qf_employment_outlook_value_agg,occupation_quick_facts_qf_entry_level_education_help_type,occupation_quick_facts_qf_entry_level_education_help,occupation_quick_facts_qf_entry_level_education_value_type,occupation_quick_facts_qf_entry_level_education_value,occupation_quick_facts_qf_median_pay_annual_help_type,occupation_quick_facts_qf_median_pay_annual_help,occupation_quick_facts_qf_median_pay_annual_note_type,occupation_quick_facts_qf_median_pay_annual_note,occupation_quick_facts_qf_median_pay_annual_range_type,occupation_quick_facts_qf_median_pay_annual_range,occupation_quick_facts_qf_median_pay_annual_value_type,occupation_quick_facts_qf_median_pay_annual_value,occupation_quick_facts_qf_median_pay_annual_value_agg,occupation_quick_facts_qf_median_pay_hourly_help_type,occupation_quick_facts_qf_median_pay_hourly_help,occupation_quick_facts_qf_median_pay_hourly_note_type,occupation_quick_facts_qf_median_pay_hourly_note,occupation_quick_facts_qf_median_pay_hourly_value_type,occupation_quick_facts_qf_median_pay_hourly_value,occupation_quick_facts_qf_median_pay_hourly_value_agg,occupation_quick_facts_qf_number_of_jobs_help_type,occupation_quick_facts_qf_number_of_jobs_help,occupation_quick_facts_qf_number_of_jobs_range_type,occupation_quick_facts_qf_number_of_jobs_range,occupation_quick_facts_qf_number_of_jobs_value_type,occupation_quick_facts_qf_number_of_jobs_value,occupation_quick_facts_qf_number_of_jobs_value_agg,occupation_quick_facts_qf_on_the_job_training_help_type,occupation_quick_facts_qf_on_the_job_training_help,occupation_quick_facts_qf_on_the_job_training_value_type,occupation_quick_facts_qf_on_the_job_training_value,occupation_quick_facts_qf_work_experience_help_type,occupation_quick_facts_qf_work_experience_help,occupation_quick_facts_qf_work_experience_value_type,occupation_quick_facts_qf_work_experience_value,occupation_similar_occupations_section_body_type,occupation_similar_occupations_section_body,occupation_similar_occupations_section_title_type,occupation_similar_occupations_section_title,occupation_soc_coverage_soc_code_type,occupation_soc_coverage_soc_code,occupation_state_and_area_section_body_type,occupation_state_and_area_section_body,occupation_state_and_area_section_title_type,occupation_state_and_area_section_title,occupation_summary_how_to_become_one_type,occupation_summary_how_to_become_one,occupation_summary_more_information_type,occupation_summary_more_information,occupation_summary_outlook_type,occupation_summary_outlook,occupation_summary_pay_type,occupation_summary_pay,occupation_summary_similar_occupations_type,occupation_summary_similar_occupations,occupation_summary_state_and_area_type,occupation_summary_state_and_area,occupation_summary_what_they_do_type,occupation_summary_what_they_do,occupation_summary_work_environment_type,occupation_summary_work_environment,occupation_title_type,occupation_title,occupation_video_link,occupation_what_they_do_section_body_type,occupation_what_they_do_section_body,occupation_what_they_do_section_image_type,occupation_what_they_do_section_image,occupation_what_they_do_section_title_type,occupation_what_they_do_section_title,occupation_work_environment_section_body_type,occupation_work_environment_section_body,occupation_work_environment_section_image_type,occupation_work_environment_section_image,occupation_work_environment_section_title_type,occupation_work_environment_section_title,projection_year,projection_year_agg,publication_title,reference_period,reference_year,reference_year_agg) values ('2019','2019','9/2/2020','1','
<!-- BLS CITATION -->
<!-- Suggested Citation -->
<div class="citation">
<h5> Suggested citation:</h5>
<p>Bureau of Labor Statistics, U.S. Department of Labor, <cite>Occupational Outlook Handbook</cite>, Accountants and Auditors, <br />
on the Internet at <a href="https://www.bls.gov/ooh/business-and-financial/accountants-and-auditors.htm" target="_new">https://www.bls.gov/ooh/business-and-financial/accountants-and-auditors.htm</a> (visited <em><!--#config timefmt="%B %d, %Y" --><!--#echo var="DATE_LOCAL" --></em>).</p>
</div>
<!-- /Suggested Citation -->
<!-- /BLS CITATION -->
','text','Accountants and auditors prepare and examine financial records.','html','
<p>Most accountants and auditors need at least a bachelor’s degree in accounting or a related field. Certification, including the Certified Public Accountant (CPA) credential, can improve job prospects. </p>
<h3>Education</h3>
<p>Most accountant and auditor positions require at least a bachelor’s degree in accounting or a related field. Some employers prefer to hire applicants who have a master’s degree, either in accounting or in business administration with a concentration in accounting.</p>
<p>A few universities and colleges offer specialized programs, such as a bachelor’s degree in internal auditing. In some cases, those with associate’s degrees, as well as bookkeepers and accounting clerks who meet the education and experience requirements set by their employers, get junior accounting positions and advance to accountant positions by showing their accounting skills on the job.</p>
<p>Many colleges help students gain practical experience through summer or part-time internships with public accounting or business firms.</p>
<h3>Licenses, Certifications, and Registrations</h3>
<p>Every accountant filing a report with the Securities and Exchange Commission (SEC) is required by law to be a Certified Public Accountant (CPA). Many other accountants choose to become a CPA to enhance their job prospects or to gain clients. Many employers will pay the costs associated with the CPA exam.</p>
<p>CPAs are licensed by their state’s Board of Accountancy. Becoming a CPA requires passing a national exam and meeting other state requirements. Almost all states require CPA candidates to complete 150 semester hours of college coursework to be licensed, which is 30 hours more than the usual 4-year bachelor’s degree. Many schools offer a 5-year combined bachelor’s and master’s degree to meet the 150-hour requirement, but a master’s degree is not required.</p>
<p>A few states allow a number of years of public accounting experience to substitute for a college degree.</p>
<p>All states use the four-part Uniform CPA Examination from the <a class="external" href="http://www.aicpa.org/" target="_blank" rel="noopener noreferrer">American Institute of Certified Public Accountants (AICPA)</a>. Candidates do not have to pass all four parts at once, but most states require that candidates pass all four parts within 18 months of passing their first part.</p>
<p>Almost all states require CPAs to take continuing education to keep their license.</p>
<p>Certification provides an advantage in the job market because it shows professional competence in a specialized field of accounting and auditing. Accountants and auditors seek certifications from a variety of professional societies. Some of the most common certifications are listed below:</p>
<p>The <a class="external" href="https://www.imanet.org/" target="_blank" rel="noopener noreferrer">Institute of Management Accountants</a> offers the Certified Management Accountant (CMA) to applicants who complete a bachelor’s degree. Applicants must have worked at least 2 years in management accounting, pass a two-part exam, agree to meet continuing education requirements, and comply with standards of professional conduct. The exam covers areas such as financial statement analysis, working-capital policy, capital structure, valuation issues, and risk management.</p>
<p><a class="external" href="https://na.theiia.org/Pages/IIAHome.aspx" target="_blank" rel="noopener noreferrer">The Institute of Internal Auditors (IIA)</a> offers the Certified Internal Auditor (CIA) to graduates from accredited colleges and universities who have worked for 2 years as internal auditors and have passed a four-part exam. The IIA also offers the Certified in Control Self-Assessment (CCSA), Certified Government Auditing Professional (CGAP), Certified Financial Services Auditor (CFSA), and Certification in Risk Management Assurance (CRMA) to those who pass the exams and meet educational and experience requirements.</p>
<p><a class="external" href="https://www.isaca.org/pages/default.aspx" target="_blank" rel="noopener noreferrer">ISACA</a> offers the Certified Information Systems Auditor (CISA) to candidates who pass an exam and have 5 years of experience auditing information systems. Information systems experience, financial or operational auditing experience, or related college credit hours can be substituted for up to 3 years of experience in information systems auditing, control, or security.</p>
<p>For accountants with a CPA, the AICPA offers the option to receive any or all of the Accredited in Business Valuation (ABV), Certified Information Technology Professional (CITP), or Personal Financial Specialist (PFS) certifications. The ABV requires passing a written exam, completion of at least six business valuation projects, and 75 hours of continuing education. The CITP requires 1,000 hours of business technology experience and 75 hours of continuing education. Candidates for the PFS also must complete a certain amount of work experience and continuing education, and pass a written exam.</p>
<h3>Advancement</h3>
<p>Some <a href="/ooh/management/top-executives.htm" title="Top Executives"><u>top executives</u></a> and <a href="/ooh/management/financial-managers.htm" title="Financial Managers"><u>financial managers</u></a> have a background in accounting, internal auditing, or finance.</p>
<p>Entry-level public accountants can advance to senior positions with more responsibility. Those who excel may become supervisors, managers, or partners; open their own public accounting firm; or transfer to executive positions in management accounting or internal auditing in private firms.</p>
<p>Management accountants often start as cost accountants, junior internal auditors, or trainees for other accounting positions. As they rise through the organization, they may advance to accounting manager, chief cost accountant, budget director, or manager of internal auditing. Some become controllers, treasurers, financial vice presidents, chief financial officers, or corporation presidents.</p>
<p>Public accountants, management accountants, and internal auditors can move from one aspect of accounting and auditing to another. Public accountants often move into management accounting or internal auditing. Management accountants may become internal auditors, and internal auditors may become management accountants. However, it is less common for management accountants or internal auditors to move into public accounting.</p>
<h3>Important Qualities</h3>
<p><strong><em>Analytical skills.</em></strong> Accountants and auditors must be able to identify issues in documentation and suggest solutions. For example, public accountants use analytical skills in their work to minimize tax liability, and internal auditors use these skills to detect fraudulent use of funds.</p>
<p><strong><em>Communication skills.</em></strong> Accountants and auditors must be able to listen carefully to facts and concerns from clients, managers, and others. They must also be able to discuss the results of their work in both meetings and written reports.</p>
<p><strong><em>Detail oriented.</em></strong> Accountants and auditors must pay attention to detail when compiling and examining documentation.</p>
<p><strong><em>Math skills.</em></strong> Accountants and auditors must be able to analyze, compare, and interpret facts and figures, although complex math skills are not necessary.</p>
<p><strong><em>Organizational skills.</em></strong> Strong organizational skills are important for accountants and auditors, who often work with a range of financial documents for a variety of clients.</p>
','html','
<img src="/ooh/images/1743.jpg" width="336" height="240" alt="Accountants and auditors" />
<div class="image-caption" style="width: 326px;">Most accountants and auditors need at least a bachelor�s degree in accounting or a related field.</div>
','text','How to Become an Accountant or Auditor','html','
<img src="/ooh/images/15122.jpg" width="335" height="240" alt="accountants and auditors image" />
<div class="image-caption" style="width: 325px;">Accountants and auditors ensure that financial records are accurate and taxes are paid properly and on time.</div>
','html','
<p>Employment of accountants and auditors is projected to grow 4 percent from 2019 to 2029, about as fast as the average for all occupations. Globalization, a growing economy, and a complex tax and regulatory environment are expected to continue to lead to strong demand for accountants and auditors.</p>
<p>In general, employment growth of accountants and auditors is expected to be closely tied to the health of the overall economy. As the economy grows, these workers will continue to be needed to prepare and examine financial records. In addition, as more companies go public, there will be greater need for public accountants to handle the legally required financial documentation.</p>
<p>The continued globalization of business may lead to increased demand for accounting expertise and services related to international trade and international mergers and acquisitions.</p>
<p>Technological change is expected to affect the role of accountants over the next 10 years. As platforms such as cloud computing become more widespread, some routine accounting tasks may become automated. Although this will allow accountants to become more efficient, this change is not expected to reduce the overall demand for accountants. Instead, with the automation of routine tasks, such as data entry, the advisory and analytical duties of accountants will become more prominent.</p>
<h3>Job Prospects</h3>
<p>Demand for accountants may lead to good prospects for entry-level positions. However, competition will be stronger for jobs with the most prestigious accounting and business firms.</p>
<p>Accountants and auditors who have earned professional recognition, especially as Certified Public Accountants (CPAs), should have the best prospects. Job applicants who have a master’s degree in accounting or a master’s degree in business administration (MBA) with a concentration in accounting also may have an advantage.</p>
','html','
<!-- CMS Bar Graph --><div class="ooh-chart'' ><div style="min-height:270.89px;"><h4> Accountants and Auditors</h4><p> Percent change in employment, projected 2019-29</p><dl> <dt style="top: -5px;"><span> Accountants and auditors </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:132.0px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:132.0px;" class="positive cms-bar-color-light-blue"><span style="top:22px;"><span style="left:28.0px;"> 4% </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Total, all occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:132.0px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:132.0px;" class="positive cms-bar-color-red"><span style="top:22px;"><span style="left:28.0px;"> 4% </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Financial specialists </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:132.0px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:132.0px;" class="positive cms-bar-color-blue"><span style="top:22px;"><span style="left:28.0px;"> 4% </span></span></p></div></div></dd> <dt style="height:1.5em;"> </dt><dd class="legend"><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div style="display:none;"><p><span></span></p></div></dd></dl><div class="clearfloat"></div><p class="footer"> Note: All Occupations includes all occupations in the U.S. Economy.<br>Source: U.S. Bureau of Labor Statistics, Employment Projections program</p></div></div><!-- CMS Bar Graph -->
','html','
<table>
<caption>Employment projections data for accountants and auditors, 2019-29</caption>
<thead>
<tr>
<th rowspan="2">Occupational Title</th>
<th rowspan="2">SOC Code</th>
<th rowspan="2">Employment, 2019</th>
<th rowspan="2">Projected Employment, 2029</th>
<th colspan="2">Change, 2019-29</th>
<th rowspan="2" colspan="2">Employment by Industry</th>
</tr>
<tr>
<th>Percent</th>
<th>Numeric</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="8"><p class="footnotes">SOURCE: U.S. Bureau of Labor Statistics, Employment Projections program</p></td>
</tr>
</tfoot>
<tbody>
<tr>
<th><p ><strong> Accountants and auditors</strong></p></th>
<td style="align: right">13-2011</td>
<td style="align: right">1,436,100</td>
<td style="align: right">1,497,900</td>
<td style="align: right">4</td>
<td style="align: right">61,700</td>
<td style="align: right"><a href="https://data.bls.gov/projections/nationalMatrix?queryParams=13-2011&ioType=o">Get data</a></td>
</tr>
</tbody>
</table>
','text','Job Outlook','html','
<p>For more information about accredited accounting programs, visit</p>
<p><a class="external" href="http://www.aacsb.edu/" target="_blank" rel="noopener noreferrer">AACSB International—The Association to Advance Collegiate Schools of Business</a></p>
<p>For more information about the Certified Public Accountant (CPA) designation, visit</p>
<p><a class="external" href="http://www.aicpa.org/" target="_blank" rel="noopener noreferrer">American Institute of Certified Public Accountants (AICPA)</a></p>
<p>For more information about management accounting and the Certified Management Accountant (CMA) designation, visit</p>
<p><a class="external" href="https://www.imanet.org/" target="_blank" rel="noopener noreferrer">Institute of Management Accountants</a></p>
<p>For more information about internal auditing and the Certified Internal Auditor (CIA) designation, visit</p>
<p><a class="external" href="https://na.theiia.org/Pages/IIAHome.aspx" target="_blank" rel="noopener noreferrer">The Institute of Internal Auditors</a></p>
<p>For more information about information systems auditing and the Certified Information Systems Auditor (CISA) designation, visit</p>
<p><a class="external" href="https://www.isaca.org/pages/default.aspx" target="_blank" rel="noopener noreferrer">ISACA</a></p>
<p>For more information about certifications in accounting, visit</p>
<p><a class="external" href="http://www.gafm.com/" target="_blank" rel="noopener noreferrer">Global Academy of Finance and Management</a></p>
<p></p>
<h3>O*NET</h3>
<p><a class="external" target="_blank" href="http://www.onetonline.org/link/summary/13-2011.01" class="onet">Accountants</a></p><p><a class="external" target="_blank" href="http://www.onetonline.org/link/summary/13-2011.00" class="onet">Accountants and Auditors</a></p><p><a class="external" target="_blank" href="http://www.onetonline.org/link/summary/13-2011.02" class="onet">Auditors</a></p>
','text','Contacts for More Information','Y047','text','Accountants and Auditors','text','Accountants and Auditors','text','Accountant or Auditor','html','
<p>
The median annual wage for accountants and auditors was $71,550 in May 2019.
The median wage is the wage at which half the workers in an occupation earned more than that amount and half earned less. The lowest 10 percent earned less than $44,480, and the highest 10 percent earned more than $124,450.
</p><p>
</p>
<p>In May 2019, the median annual wages for accountants and auditors in the top industries in which they worked were as follows:</p>
<table class="ooh-tab-table">
<tbody>
<tr>
<td>Finance and insurance</td>
<td align="right">
$76,440
</td>
</tr>
<tr>
<td>Management of companies and enterprises</td>
<td align="right">
74,060
</td>
</tr>
<tr>
<td>Accounting, tax preparation, bookkeeping, and payroll services</td>
<td align="right">
71,390
</td>
</tr>
<tr>
<td>Government</td>
<td align="right">
70,180
</td>
</tr>
</tbody>
</table>
<p>Most accountants and auditors work full time. Some work more than 40 hours per week. Longer hours are typical at certain times of the year, such as at the end of the budget year or during tax season.</p>
','html','
<!-- CMS Bar Graph --><div class=''ooh-chart'' ><div style="min-height:270.89px;"><h4> Accountants and Auditors</h4><p> Median annual wages, May 2019</p><dl> <dt style="top: -5px;"><span> Financial specialists </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:263.99266177451636px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:263.99266177451636px;" class="positive cms-bar-color-blue"><span style="top:22px;"><span style="left:1px;"> $71,950 </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Accountants and auditors </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:262.5250166777852px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:262.5250166777852px;" class="positive cms-bar-color-light-blue"><span style="top:22px;"><span style="left:1px;"> $71,550 </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Total, all occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:146.0673782521681px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:146.0673782521681px;" class="positive cms-bar-color-red"><span style="top:22px;"><span style="left:58.0px;"> $39,810 </span></span></p></div></div></dd> <dt style="height:1.5em;"> </dt><dd class="legend"><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div style="display:none;"><p><span></span></p></div></dd></dl><div class="clearfloat"></div><p class="footer"> Note: All Occupations includes all occupations in the U.S. Economy.<br>Source: U.S. Bureau of Labor Statistics, Occupational Employment Statistics</p></div></div><!-- CMS Bar Graph -->
','text','Pay','yyyy-mm-dd','date','9/1/20','hh:mm','Eastern Daylight Time (EDT)','time','12:00','text','The projected numeric change in employment from 2019 to 2029.','int','61700','61700','As fast as average','text','The projected percent change in employment from 2019 to 2029. The average growth rate for all occupations is 4 percent.','text','As fast as average','int','4','4','text','Typical level of education that most workers need to enter this occupation.','text','Bachelor''s degree','text','The wage at which half of the workers in the occupation earned more than that amount and half earned less. Median wage data are from the BLS Occupational Employment Statistics survey. In May 2019, the median annual wage for all workers was $39,810.','text',null,'text','$60,000 to $79,999','int','71550','71550','text','The wage at which half of the workers in the occupation earned more than that amount and half earned less. Median wage data are from the BLS Occupational Employment Statistics survey. In May 2019, the median annual wage for all workers was $39,810.','text',null,'decimal','34.4','34.4','text','The employment, or size, of this occupation in 2019, which is the base year of the 2019-29 employment projections.','text','50,000 or more','int','1436100','1436100','text','Additional training needed (postemployment) to attain competency in the skills needed in this occupation.','text','None','text','Work experience that is commonly considered necessary by employers, or is a commonly accepted substitute for more formal types of training or education.','text','None','html','
<p>This table shows a list of occupations with job duties that are similar to those of accountants and auditors.</p>
<table>
<thead>
<tr>
<th></th>
<th>Occupation</th>
<th>Job Duties</th>
<th>Entry-Level Education</th>
<th>Median Annual Pay, May 2019</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="/ooh/office-and-administrative-support/bookkeeping-accounting-and-auditing-clerks.htm">
<img src="/ooh/images/2812.jpg" width="70" height="50" alt="Bookkeeping, accounting, and auditing clerks" />
</a>
</td>
<td>
<h4><a href="/ooh/office-and-administrative-support/bookkeeping-accounting-and-auditing-clerks.htm"> Bookkeeping, Accounting, and Auditing Clerks</a></h4>
</td>
<td>
<p>Bookkeeping, accounting, and auditing clerks produce financial records for organizations and check financial records for accuracy.</p>
</td>
<td style="width: 180px">
<span title="3. Some college, no degree"> Some college, no degree</span>
</td>
<td style="width: 140px">
<span title="41230">$41,230</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/budget-analysts.htm">
<img src="/ooh/images/1755.jpg" width="70" height="50" alt="Budget analysts" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/budget-analysts.htm"> Budget Analysts</a></h4>
</td>
<td>
<p>Budget analysts help public and private institutions organize their finances.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="76540">$76,540</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/cost-estimators.htm">
<img src="/ooh/images/1715.jpg" width="70" height="50" alt="Cost estimators" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/cost-estimators.htm"> Cost Estimators</a></h4>
</td>
<td>
<p>Cost estimators collect and analyze data in order to estimate the time, money, materials, and labor required to make a product or provide a service.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="65250">$65,250</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/financial-analysts.htm">
<img src="/ooh/images/1757.jpg" width="70" height="50" alt="Financial analysts" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/financial-analysts.htm"> Financial Analysts</a></h4>
</td>
<td>
<p>Financial analysts provide guidance to businesses and individuals making investment decisions.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="81590">$81,590</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/management/financial-managers.htm">
<img src="/ooh/images/1603.jpg" width="70" height="50" alt="Financial managers" />
</a>
</td>
<td>
<h4><a href="/ooh/management/financial-managers.htm"> Financial Managers</a></h4>
</td>
<td>
<p>Financial managers create financial reports, direct investment activities, and develop plans for the long-term financial goals of their organization.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="129890">$129,890</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/management-analysts.htm">
<img src="/ooh/images/1730.jpg" width="70" height="50" alt="Management analysts" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/management-analysts.htm"> Management Analysts</a></h4>
</td>
<td>
<p>Management analysts recommend ways to improve an organization’s efficiency.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="85260">$85,260</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/personal-financial-advisors.htm">
<img src="/ooh/images/1766.jpg" width="70" height="50" alt="Personal financial advisors" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/personal-financial-advisors.htm"> Personal Financial Advisors</a></h4>
</td>
<td>
<p>Personal financial advisors provide advice to help individuals manage their finances and plan for their financial future.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="87850">$87,850</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/education-training-and-library/postsecondary-teachers.htm">
<img src="/ooh/images/2162.jpg" width="70" height="50" alt="Postsecondary teachers" />
</a>
</td>
<td>
<h4><a href="/ooh/education-training-and-library/postsecondary-teachers.htm"> Postsecondary Teachers</a></h4>
</td>
<td>
<p>Postsecondary teachers instruct students in a wide variety of academic and technical subjects beyond the high school level.</p>
</td>
<td style="width: 180px">
<span title="9. See How to Become One"><a href="/ooh/education-training-and-library/postsecondary-teachers.htm#tab-4"> See How to Become One</a></span>
</td>
<td style="width: 140px">
<span title="79540">$79,540</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/tax-examiners-and-collectors-and-revenue-agents.htm">
<img src="/ooh/images/1783.jpg" width="70" height="50" alt="Tax examiners and collectors, and revenue agents" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/tax-examiners-and-collectors-and-revenue-agents.htm"> Tax Examiners and Collectors, and Revenue Agents</a></h4>
</td>
<td>
<p>Tax examiners and collectors, and revenue agents determine how much is owed in taxes and collect tax from individuals and businesses on behalf of the government.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="54890">$54,890</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/management/top-executives.htm">
<img src="/ooh/images/1699.jpg" width="71" height="50" alt="Top executives" />
</a>
</td>
<td>
<h4><a href="/ooh/management/top-executives.htm"> Top Executives</a></h4>
</td>
<td>
<p>Top executives plan strategies and policies to ensure that an organization meets its goals.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="104690">$104,690</span>
</td>
</tr>
</tbody>
</table>
','text','Similar Occupations','text','13-2011','html','
<h3><strong>Occupational Employment Statistics (OES)</strong></h3>
<p>The <a href="https://www.bls.gov/oes/">Occupational Employment Statistics</a> (OES) program produces employment and wage estimates annually for over 800 occupations. These estimates are available for the nation as a whole, for individual states, and for metropolitan and nonmetropolitan areas. The link(s) below go to OES data maps for employment and wages by state and area.</p>
<ul>
<li><a href="https://www.bls.gov/oes/current/oes132011.htm#st">Accountants and auditors</a></li>
</ul>
<h3><strong>Projections Central</strong></h3>
<p>Occupational employment projections are developed for all states by Labor Market Information (LMI) or individual state Employment Projections offices. All state projections data are available at <a href="http://www.projectionscentral.com/" class="external" target="_blank">www.projectionscentral.com</a>. Information on this site allows projected employment growth for an occupation to be compared among states or to be compared within one state. In addition, states may produce projections for areas; there are links to each state’s websites where these data may be retrieved.</p>
<h3><strong>CareerOneStop </strong></h3>
<p>CareerOneStop includes hundreds of <a href="http://www.careerinfonet.org/Occupations/select_occupation.aspx?next=occ_rep&level=&optstatus=111111111&id=1&nodeid=2&soccode=&stfips=&jobfam=&menuMode" class="external" target="_blank">occupational profiles</a> with data available by state and metro area. There are links in the left-hand side menu to compare occupational employment by state and occupational wages by local area or metro area. There is also a <a href="http://www.careeronestop.org/SalariesBenefits/Sal_default.aspx" class="external" target="_blank">salary info tool</a> to search for wages by zip code.</p>
','text','State and Area Data','html','
<h4>How to Become an Accountant or Auditor</h4>
<p>Most employers require a candidate to have a bachelor’s degree in accounting or a related field. Certification within a specific field of accounting improves job prospects. For example, many accountants become Certified Public Accountants (CPAs).</p>
','html','
<h4>More Information, Including Links to O*NET</h4>
<p>Learn more about accountants and auditors by visiting additional resources, including O*NET, a source on key characteristics of workers and occupations.</p>
','html','
<h4>Job Outlook</h4>
<p>Employment of accountants and auditors is projected to grow 4 percent from 2019 to 2029, about as fast as the average for all occupations. In general, employment growth of accountants and auditors is expected to be closely tied to the health of the overall economy. As the economy grows, more workers should be needed to prepare and examine financial records.</p>
','html','
<h4>Pay</h4>
<p>The median annual wage for accountants and auditors was $71,550 in May 2019.</p> ','html','
<h4>Similar Occupations</h4>
<p>Compare the job duties, education, job growth, and pay of accountants and auditors with similar occupations.</p>
','html','
<h4>State and Area Data</h4>
<p>Explore resources for employment and wages by state and area for accountants and auditors.</p>
','html','
<h4>What Accountants and Auditors Do </h4>
<p>Accountants and auditors prepare and examine financial records.</p>
','html','
<h4>Work Environment</h4>
<p>Most accountants and auditors work full time. Some work more than 40 hours per week. Overtime hours are typical at certain times of the year, such as at the end of the budget year or during tax season.</p>
','text','Accountants and Auditors','https://www.youtube.com/watch?v=u9pgua9hT6k','html','
<p>Accountants and auditors prepare and examine financial records. They ensure that financial records are accurate and that taxes are paid properly and on time. Accountants and auditors assess financial operations and work to help ensure that organizations run efficiently.</p>
<h3>Duties</h3>
<p>Accountants and auditors typically do the following:</p>
<ul>
<li>Examine financial statements to ensure that they are accurate and comply with laws and regulations</li>
<li>Compute taxes owed, prepare tax returns, and ensure that taxes are paid properly and on time</li>
<li>Inspect account books and accounting systems for efficiency and use of accepted accounting procedures</li>
<li>Organize and maintain financial records</li>
<li>Assess financial operations and make best-practices recommendations to management</li>
<li>Suggest ways to reduce costs, enhance revenues, and improve profits</li>
</ul>
<p>In addition to examining and preparing financial documentation, accountants and auditors must explain their findings. This includes preparing written reports and meeting face-to-face with organization managers and individual clients.</p>
<p>Many accountants and auditors specialize, depending on the particular organization that they work for. Some work for organizations that specialize in assurance services (improving the quality or context of information for decisionmakers) or risk management (determining the probability of a misstatement on financial documentation). Other organizations specialize in specific industries, such as healthcare.</p>
<p>The following are examples of types of accountants and auditors:</p>
<p><strong><em>Public accountants</em></strong> perform a broad range of accounting, auditing, tax, and consulting tasks. Their clients include corporations, governments, and individuals.</p>
<p>Public accountants work with financial documents that clients are required by law to disclose. These include tax forms and balance sheet statements that corporations must provide to potential investors. For example, some public accountants concentrate on tax matters, advising corporations about the tax advantages of certain business decisions or preparing individual income tax returns.</p>
<p>Public accountants, many of whom are Certified Public Accountants (CPAs), generally have their own businesses or work for public accounting firms. Publicly traded companies are required to have CPAs sign documents they submit to the Securities and Exchange Commission (SEC), including annual and quarterly reports.</p>
<p>Some public accountants specialize in forensic accounting, investigating financial crimes such as securities fraud and embezzlement, bankruptcies and contract disputes, and other complex and potentially criminal financial transactions. Forensic accountants combine their knowledge of accounting and finance with law and investigative techniques to determine if an activity is illegal. Many forensic accountants work closely with law enforcement personnel and lawyers during investigations and often appear as expert witnesses during trials.</p>
<p><strong><em>Management accountants</em></strong>, also called <em>cost</em>,<strong><em> </em></strong><em>managerial</em>,<strong><em> </em></strong><em>industrial</em>, <em>corporate</em>, or <em>private accountants</em>, record and analyze the financial information of the organizations for which they work. The information that management accountants prepare is intended for internal use by business managers, not by the general public.</p>
<p>Management accountants often work on budgeting and performance evaluation. They also may help organizations plan the cost of doing business. Some may work with financial managers on asset management, which involves planning and selecting financial investments such as stocks, bonds, and real estate.</p>
<p><strong><em>Government accountants</em></strong> maintain and examine the records of government agencies and audit private businesses and individuals whose activities are subject to government regulations or taxation. Accountants employed by federal, state, and local governments ensure that revenues are received and spent in accordance with laws and regulations.</p>
<p><strong><em>Internal auditors</em></strong> check for mismanagement of an organization’s funds. They identify ways to improve the processes for finding and eliminating waste and fraud. The practice of internal auditing is not regulated, but The Institute of Internal Auditors (IIA) provides generally accepted standards.</p>
<p><strong><em>External auditors</em></strong><em> </em>perform similar duties to internal auditors, but are employed by an outside organization, rather than the one they are auditing. They review clients’ financial statements and inform investors and authorities that the statements have been correctly prepared and reported.</p>
<p><strong><em>Information technology auditors</em></strong> are internal auditors who review controls for their organization’s computer systems to ensure that the financial data comes from a reliable source.</p>
','html','
<img src="/ooh/images/1740.jpg" width="336" height="240" alt="Accountants and auditors" />
<div class="image-caption" style="width: 326px;">Accountants and auditors examine financial statements for accuracy and conformance with laws.</div>
','text','What Accountants and Auditors Do','html','
<p>Accountants and auditors held about 1.4 million jobs in 2019. The largest employers of accountants and auditors were as follows:</p>
<table class="ooh-tab-table">
<tbody>
<tr>
<td>Accounting, tax preparation, bookkeeping, and payroll services</td>
<td align="right">24%</td>
</tr>
<tr>
<td>Finance and insurance</td>
<td align="right">9</td>
</tr>
<tr>
<td>Government</td>
<td align="right">8</td>
</tr>
<tr>
<td>Management of companies and enterprises</td>
<td align="right">7</td>
</tr>
<tr>
<td>Self-employed workers</td>
<td align="right">6</td>
</tr>
</tbody>
</table>
<p>Most accountants and auditors work in offices, but some work from home. Although they complete much of their work alone, they sometimes work in teams with other accountants and auditors. Accountants and auditors may travel to their clients’ places of business.</p>
<h3>Work Schedules</h3>
<p>Most accountants and auditors work full time. Some work more than 40 hours per week. Longer periods of work are typical at certain times of the year, such as at the end of the budget year or during tax season.</p>
','html','
<img src="/ooh/images/1741.jpg" width="336" height="240" alt="Accountants and auditors" />
<div class="image-caption" style="width: 326px;">Most accountants and auditors work full time.</div>
','text','Work Environment','2029','2029','Occupational Outlook Handbook','May 2019','2019','2019');
INSERT INTO blsoccupationhandbook (current_year,current_year_agg,last_updated,occupation_id,occupation_citation,occupation_description_type,occupation_description,occupation_how_to_become_one_section_body_type,occupation_how_to_become_one_section_body,occupation_how_to_become_one_section_image_type,occupation_how_to_become_one_section_image,occupation_how_to_become_one_section_title_type,occupation_how_to_become_one_section_title,occupation_image_type,occupation_image,occupation_job_outlook_section_body_type,occupation_job_outlook_section_body,occupation_job_outlook_section_chart_type,occupation_job_outlook_section_chart,occupation_job_outlook_section_datatable_type,occupation_job_outlook_section_datatable,occupation_job_outlook_section_title_type,occupation_job_outlook_section_title,occupation_more_information_section_body_type,occupation_more_information_section_body,occupation_more_information_section_title_type,occupation_more_information_section_title,occupation_occupation_code,occupation_occupation_name_full_type,occupation_occupation_name_full,occupation_occupation_name_short_plural_type,occupation_occupation_name_short_plural,occupation_occupation_name_short_singular_type,occupation_occupation_name_short_singular,occupation_pay_section_body_type,occupation_pay_section_body,occupation_pay_section_chart_html_type,occupation_pay_section_chart_html,occupation_pay_section_title_type,occupation_pay_section_title,occupation_publish_date_format,occupation_publish_date_type,occupation_publish_date,occupation_publish_time_format,occupation_publish_time_note,occupation_publish_time_type,occupation_publish_time,occupation_quick_facts_qf_employment_openings_help_type,occupation_quick_facts_qf_employment_openings_help,occupation_quick_facts_qf_employment_openings_value_type,occupation_quick_facts_qf_employment_openings_value,occupation_quick_facts_qf_employment_openings_value_agg,occupation_quick_facts_qf_employment_outlook_description,occupation_quick_facts_qf_employment_outlook_help_type,occupation_quick_facts_qf_employment_outlook_help,occupation_quick_facts_qf_employment_outlook_range_type,occupation_quick_facts_qf_employment_outlook_range,occupation_quick_facts_qf_employment_outlook_value_type,occupation_quick_facts_qf_employment_outlook_value,occupation_quick_facts_qf_employment_outlook_value_agg,occupation_quick_facts_qf_entry_level_education_help_type,occupation_quick_facts_qf_entry_level_education_help,occupation_quick_facts_qf_entry_level_education_value_type,occupation_quick_facts_qf_entry_level_education_value,occupation_quick_facts_qf_median_pay_annual_help_type,occupation_quick_facts_qf_median_pay_annual_help,occupation_quick_facts_qf_median_pay_annual_note_type,occupation_quick_facts_qf_median_pay_annual_note,occupation_quick_facts_qf_median_pay_annual_range_type,occupation_quick_facts_qf_median_pay_annual_range,occupation_quick_facts_qf_median_pay_annual_value_type,occupation_quick_facts_qf_median_pay_annual_value,occupation_quick_facts_qf_median_pay_annual_value_agg,occupation_quick_facts_qf_median_pay_hourly_help_type,occupation_quick_facts_qf_median_pay_hourly_help,occupation_quick_facts_qf_median_pay_hourly_note_type,occupation_quick_facts_qf_median_pay_hourly_note,occupation_quick_facts_qf_median_pay_hourly_value_type,occupation_quick_facts_qf_median_pay_hourly_value,occupation_quick_facts_qf_median_pay_hourly_value_agg,occupation_quick_facts_qf_number_of_jobs_help_type,occupation_quick_facts_qf_number_of_jobs_help,occupation_quick_facts_qf_number_of_jobs_range_type,occupation_quick_facts_qf_number_of_jobs_range,occupation_quick_facts_qf_number_of_jobs_value_type,occupation_quick_facts_qf_number_of_jobs_value,occupation_quick_facts_qf_number_of_jobs_value_agg,occupation_quick_facts_qf_on_the_job_training_help_type,occupation_quick_facts_qf_on_the_job_training_help,occupation_quick_facts_qf_on_the_job_training_value_type,occupation_quick_facts_qf_on_the_job_training_value,occupation_quick_facts_qf_work_experience_help_type,occupation_quick_facts_qf_work_experience_help,occupation_quick_facts_qf_work_experience_value_type,occupation_quick_facts_qf_work_experience_value,occupation_similar_occupations_section_body_type,occupation_similar_occupations_section_body,occupation_similar_occupations_section_title_type,occupation_similar_occupations_section_title,occupation_soc_coverage_soc_code_type,occupation_soc_coverage_soc_code,occupation_state_and_area_section_body_type,occupation_state_and_area_section_body,occupation_state_and_area_section_title_type,occupation_state_and_area_section_title,occupation_summary_how_to_become_one_type,occupation_summary_how_to_become_one,occupation_summary_more_information_type,occupation_summary_more_information,occupation_summary_outlook_type,occupation_summary_outlook,occupation_summary_pay_type,occupation_summary_pay,occupation_summary_similar_occupations_type,occupation_summary_similar_occupations,occupation_summary_state_and_area_type,occupation_summary_state_and_area,occupation_summary_what_they_do_type,occupation_summary_what_they_do,occupation_summary_work_environment_type,occupation_summary_work_environment,occupation_title_type,occupation_title,occupation_video_link,occupation_what_they_do_section_body_type,occupation_what_they_do_section_body,occupation_what_they_do_section_image_type,occupation_what_they_do_section_image,occupation_what_they_do_section_title_type,occupation_what_they_do_section_title,occupation_work_environment_section_body_type,occupation_work_environment_section_body,occupation_work_environment_section_image_type,occupation_work_environment_section_image,occupation_work_environment_section_title_type,occupation_work_environment_section_title,projection_year,projection_year_agg,publication_title,reference_period,reference_year,reference_year_agg) values ('2019',null,'9/2/2020','2','
<!-- BLS CITATION -->
<!-- Suggested Citation -->
<div class="citation">
<h5> Suggested citation:</h5>
<p>Bureau of Labor Statistics, U.S. Department of Labor, <cite>Occupational Outlook Handbook</cite>, Actors, <br />
on the Internet at <a href="https://www.bls.gov/ooh/entertainment-and-sports/actors.htm" target="_new">https://www.bls.gov/ooh/entertainment-and-sports/actors.htm</a> (visited <em><!--#config timefmt="%B %d, %Y" --><!--#echo var="DATE_LOCAL" --></em>).</p>
</div>
<!-- /Suggested Citation -->
<!-- /BLS CITATION -->
','text','Actors express ideas and portray characters in theater, film, television, and other performing arts media.','html','
<p>Many actors enhance their skills through formal dramatic education, and long-term training is common.</p>
<h3>Education</h3>
<p>Many actors enhance their skills through formal dramatic education. Many who specialize in theater have bachelor’s degrees, but a degree is not required.</p>
<p>Although some people succeed in acting without getting a formal education, most actors acquire some formal preparation through a theater company’s acting conservatory or a university drama or theater arts program. Students can take college classes in drama or filmmaking to prepare for a career as an actor. Classes in dance or music may help as well.</p>
<p>Actors who do not have a college degree may take acting or film classes to learn their craft. Community colleges, acting conservatories, and private film schools typically offer these classes. Many theater companies also have education programs.</p>
<h3>Important Qualities</h3>
<p><strong><em>Creativity.</em></strong> Actors interpret their characters’ feelings and motives in order to portray the characters in the most compelling way.</p>
<p><strong><em>Memorization skills.</em></strong> Actors memorize many lines before filming begins or a show opens. Television actors often appear on camera with little time to memorize scripts, and scripts frequently may be revised or even written just moments before filming.</p>
<p><strong><em>Persistence.</em></strong> Actors may audition for many roles before getting a job. They must be able to accept rejection and keep going.</p>
<p><strong><em>Physical stamina.</em></strong> Actors should be in good enough physical condition to endure the heat from stage or studio lights and the weight of heavy costumes or makeup. They may work many hours, including acting in more than one performance a day, and they must do so without getting overly tired.</p>
<p><strong><em>Reading skills.</em></strong> Actors must read scripts and be able to interpret how a writer has developed their character.</p>
<p><strong><em>Speaking skills.</em></strong> Actors—particularly stage actors—must say their lines clearly, project their voice, and pronounce words so that audiences understand them.</p>
<p>In addition to these qualities, actors usually must be physically coordinated to perform predetermined, sometimes complex movements with other actors, such as dancing or stage fighting, in order to complete a scene.</p>
<h3>Training</h3>
<p>It takes many years of practice to develop the skills needed to be a successful actor, and actors never truly finish training. They work to improve their acting skills throughout their career. Many actors continue to train through workshops, rehearsals, or mentoring by a drama coach.</p>
<p>Every role is different, and an actor may need to learn something new for each one. For example, a role may require learning how to sing or dance, or an actor may have to learn to speak with an accent or to play a musical instrument or sport.</p>
<p>Many aspiring actors begin by participating in school plays or local theater productions. In television and film, actors usually start out in smaller roles or independent movies and work their way up to bigger productions.</p>
<h3>Advancement</h3>
<p>As an actor’s reputation grows, he or she may work on bigger projects or in more prestigious venues. Some actors become <a href="/ooh/entertainment-and-sports/producers-and-directors.htm" title="Producers and Directors">producers and directors</a>.</p>
','html','
<img src="/ooh/images/2287.jpg" width="240" height="336" alt="Actors" />
<div class="image-caption" style="width: 230px;">Actors may audition for many roles before getting a job.</div>
','text','How to Become an Actor','html','
<img src="/ooh/images/15292.jpg" width="335" height="240" alt="actors image" />
<div class="image-caption" style="width: 325px;">Actors interpret a writer's script to entertain or inform an audience.</div>
','html','
<p>Employment of actors is projected to grow 3 percent from 2019 to 2029, about as fast as the average for all occupations. The number of Internet-only platforms, such as streaming services, is likely to increase, along with the number of shows produced for these platforms. This growth may lead to more work for actors.</p>
<p>Many small and medium-sized theaters have difficulty getting funding. As a result, the number of performances is expected to decline. Large theaters, with their more stable sources of funding and more well-known plays and musicals, should provide more opportunities for actors.</p>
<h3>Job Prospects</h3>
<p>Actors face intense competition for jobs. Most roles, no matter how minor, have many actors auditioning for them. For stage roles, actors with a bachelor’s degree in theater may have a better chance of landing a part than those without one.</p>
','html','
<!-- CMS Bar Graph --><div class=''ooh-chart'' ><div style="min-height:270.89px;"><h4> Actors</h4><p> Percent change in employment, projected 2019-29</p><dl> <dt style="top: -5px;"><span> Entertainers and performers, sports and related workers </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:231.0px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:231.0px;" class="positive cms-bar-color-blue"><span style="top:22px;"><span style="left:28.0px;"> 7% </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Total, all occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:132.0px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:132.0px;" class="positive cms-bar-color-red"><span style="top:22px;"><span style="left:28.0px;"> 4% </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Actors </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:99.0px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:99.0px;" class="positive cms-bar-color-light-blue"><span style="top:22px;"><span style="left:28.0px;"> 3% </span></span></p></div></div></dd> <dt style="height:1.5em;"> </dt><dd class="legend"><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div style="display:none;"><p><span></span></p></div></dd></dl><div class="clearfloat"></div><p class="footer"> Note: All Occupations includes all occupations in the U.S. Economy.<br>Source: U.S. Bureau of Labor Statistics, Employment Projections program</p></div></div><!-- CMS Bar Graph -->
','html','
<table>
<caption>Employment projections data for actors, 2019-29</caption>
<thead>
<tr>
<th rowspan="2">Occupational Title</th>
<th rowspan="2">SOC Code</th>
<th rowspan="2">Employment, 2019</th>
<th rowspan="2">Projected Employment, 2029</th>
<th colspan="2">Change, 2019-29</th>
<th rowspan="2" colspan="2">Employment by Industry</th>
</tr>
<tr>
<th>Percent</th>
<th>Numeric</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="8"><p class="footnotes">SOURCE: U.S. Bureau of Labor Statistics, Employment Projections program</p></td>
</tr>
</tfoot>
<tbody>
<tr>
<th><p ><strong> Actors</strong></p></th>
<td style="align: right">27-2011</td>
<td style="align: right">70,100</td>
<td style="align: right">72,200</td>
<td style="align: right">3</td>
<td style="align: right">2,100</td>
<td style="align: right"><a href="https://data.bls.gov/projections/nationalMatrix?queryParams=27-2011&ioType=o">Get data</a></td>
</tr>
</tbody>
</table>
','text','Job Outlook','html','
<p>For more information about actors, visit</p>
<p><a class="external" href="http://www.actorsequity.org/" target="_blank" rel="noopener noreferrer">Actors’ Equity Association</a></p>
<p><a class="external" href="https://www.arts.gov/" target="_blank" rel="noopener noreferrer">National Endowment for the Arts</a></p>
<p><a class="external" href="http://www.sagaftra.org/" target="_blank" rel="noopener noreferrer">SAG-AFTRA</a></p>
<h3>CareerOneStop</h3>
<p>For a career video on actors, visit</p>
<p><a class="external" href="http://www.careeronestop.org/videos/careeronestop-videos.aspx?videocode=27201100" target="_blank" rel="noopener noreferrer">Actors</a></p>
<h3>O*NET</h3>
<p><a class="external" target="_blank" href="http://www.onetonline.org/link/summary/27-2011.00" class="onet">Actors</a></p>
','text','Contacts for More Information','Y151','text','Actors','text','Actors','text','Actor','html','
<p>
The median hourly wage for actors was $20.43 in May 2019.
The median wage is the wage at which half the workers in an occupation earned more than that amount and half earned less. The lowest 10 percent earned less than $9.52, and the highest 10 percent earned more than $60.41.
</p><p>
</p>
<p>In May 2019, the median hourly wages for actors in the top industries in which they worked were as follows:</p>
<table class="ooh-tab-table">
<tbody>
<tr>
<td>Colleges, universities, and professional schools; state, local, and private</td>
<td align="right">
$21.11
</td>
</tr>
<tr>
<td>Professional, scientific, and technical services</td>
<td align="right">
19.27
</td>
</tr>
<tr>
<td>Theater companies and dinner theaters</td>
<td align="right">
17.72
</td>
</tr>
</tbody>
</table>
<p>Work hours for actors are extensive and irregular. Early morning, evening, weekend, and holiday work is common. Some actors work part time. Few actors work full time, and many have variable schedules. Those who work in theater may travel with a touring show across the country. Actors in movies may also travel to work on location.</p>
','html','
<!-- CMS Bar Graph --><div class=''ooh-chart'' ><div style="min-height:270.89px;"><h4> Actors</h4><p> Median hourly wages, May 2019</p><dl> <dt style="top: -5px;"><span> Entertainers and performers, sports and related workers </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:239.36px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:239.36px;" class="positive cms-bar-color-blue"><span style="top:22px;"><span style="left:1px;"> $21.76 </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Actors </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:224.73px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:224.73px;" class="positive cms-bar-color-light-blue"><span style="top:22px;"><span style="left:1px;"> $20.43 </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Total, all occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:210.54px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:210.54px;" class="positive cms-bar-color-red"><span style="top:22px;"><span style="left:52.0px;"> $19.14 </span></span></p></div></div></dd> <dt style="height:1.5em;"> </dt><dd class="legend"><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div style="display:none;"><p><span></span></p></div></dd></dl><div class="clearfloat"></div><p class="footer"> Note: All Occupations includes all occupations in the U.S. Economy.<br>Source: U.S. Bureau of Labor Statistics, Occupational Employment Statistics</p></div></div><!-- CMS Bar Graph -->
','text','Pay','yyyy-mm-dd','date','9/1/20','hh:mm','Eastern Daylight Time (EDT)','time','12:00','text','The projected numeric change in employment from 2019 to 2029.','int','2100','2100','As fast as average','text','The projected percent change in employment from 2019 to 2029. The average growth rate for all occupations is 4 percent.','text','As fast as average','int','3','3','text','Typical level of education that most workers need to enter this occupation.','text','Some college, no degree','text','The wage at which half of the workers in the occupation earned more than that amount and half earned less. Median wage data are from the BLS Occupational Employment Statistics survey. In May 2019, the median annual wage for all workers was $39,810.','text',null,'text','The annual wage is not available.','int',null,null,'text','The wage at which half of the workers in the occupation earned more than that amount and half earned less. Median wage data are from the BLS Occupational Employment Statistics survey. In May 2019, the median annual wage for all workers was $39,810.','text',null,'decimal','20.43','20.43','text','The employment, or size, of this occupation in 2019, which is the base year of the 2019-29 employment projections.','text','1,000 to 4,999','int','70100','70100','text','Additional training needed (postemployment) to attain competency in the skills needed in this occupation.','text','Long-term on-the-job training','text','Work experience that is commonly considered necessary by employers, or is a commonly accepted substitute for more formal types of training or education.','text','None','html','
<p>This table shows a list of occupations with job duties that are similar to those of actors.</p>
<table>
<thead>
<tr>
<th></th>
<th>Occupation</th>
<th>Job Duties</th>
<th>Entry-Level Education</th>
<th>Median Annual Pay, May 2019</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="/ooh/media-and-communication/announcers.htm">
<img src="/ooh/images/2333.jpg" width="70" height="50" alt="Radio and television announcers" />
</a>
</td>
<td>
<h4><a href="/ooh/media-and-communication/announcers.htm"> Announcers</a></h4>
</td>
<td>
<p>Announcers present music, news, and sports and may provide commentary or interview guests.</p>
</td>
<td style="width: 180px">
<span title="9. See How to Become One"><a href="/ooh/media-and-communication/announcers.htm#tab-4"> See How to Become One</a></span>
</td>
<td style="width: 140px">
<span title="39790">$39,790</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/entertainment-and-sports/dancers-and-choreographers.htm">
<img src="/ooh/images/2315.jpg" width="70" height="50" alt="Dancers and choreographers" />
</a>
</td>
<td>
<h4><a href="/ooh/entertainment-and-sports/dancers-and-choreographers.htm"> Dancers and Choreographers</a></h4>
</td>
<td>
<p>Dancers and choreographers use dance performances to express ideas and stories.</p>
</td>
<td style="width: 180px">
<span title="9. See How to Become One"><a href="/ooh/entertainment-and-sports/dancers-and-choreographers.htm#tab-4"> See How to Become One</a></span>
</td>
<td style="width: 140px">
<span title="0 The annual wage is not available."> The annual wage is not available.</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/media-and-communication/film-and-video-editors-and-camera-operators.htm">
<img src="/ooh/images/2378.jpg" width="70" height="50" alt="Film and video editors and camera operators" />
</a>
</td>
<td>
<h4><a href="/ooh/media-and-communication/film-and-video-editors-and-camera-operators.htm"> Film and Video Editors and Camera Operators</a></h4>
</td>
<td>
<p>Film and video editors and camera operators manipulate moving images that entertain or inform an audience.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="59810">$59,810</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/arts-and-design/multimedia-artists-and-animators.htm">
<img src="/ooh/images/2243.jpg" width="70" height="50" alt="Multimedia artists and animators" />
</a>
</td>
<td>
<h4><a href="/ooh/arts-and-design/multimedia-artists-and-animators.htm"> Multimedia Artists and Animators</a></h4>
</td>
<td>
<p>Multimedia artists and animators create images that appear to move and visual effects for various forms of media and entertainment.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="75270">$75,270</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/entertainment-and-sports/musicians-and-singers.htm">
<img src="/ooh/images/2326.jpg" width="70" height="50" alt="Musicians and singers" />
</a>
</td>
<td>
<h4><a href="/ooh/entertainment-and-sports/musicians-and-singers.htm"> Musicians and Singers</a></h4>
</td>
<td>
<p>Musicians and singers play instruments or sing for live audiences and in recording studios.</p>
</td>
<td style="width: 180px">
<span title="1. No formal educational credential"> No formal educational credential</span>
</td>
<td style="width: 140px">
<span title="0 The annual wage is not available."> The annual wage is not available.</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/entertainment-and-sports/producers-and-directors.htm">
<img src="/ooh/images/2289.jpg" width="70" height="50" alt="Producers and directors" />
</a>
</td>
<td>
<h4><a href="/ooh/entertainment-and-sports/producers-and-directors.htm"> Producers and Directors</a></h4>
</td>
<td>
<p>Producers and directors create motion pictures, television shows, live theater, commercials, and other performing arts productions.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="74420">$74,420</span>
</td>
</tr>
</tbody>
</table>
','text','Similar Occupations','text','27-2011','html','
<h3><strong>Occupational Employment Statistics (OES)</strong></h3>
<p>The <a href="https://www.bls.gov/oes/">Occupational Employment Statistics</a> (OES) program produces employment and wage estimates annually for over 800 occupations. These estimates are available for the nation as a whole, for individual states, and for metropolitan and nonmetropolitan areas. The link(s) below go to OES data maps for employment and wages by state and area.</p>
<ul>
<li><a href="https://www.bls.gov/oes/current/oes272011.htm#st">Actors</a></li>
</ul>
<h3><strong>Projections Central</strong></h3>
<p>Occupational employment projections are developed for all states by Labor Market Information (LMI) or individual state Employment Projections offices. All state projections data are available at <a href="http://www.projectionscentral.com/" class="external" target="_blank">www.projectionscentral.com</a>. Information on this site allows projected employment growth for an occupation to be compared among states or to be compared within one state. In addition, states may produce projections for areas; there are links to each state’s websites where these data may be retrieved.</p>
<h3><strong>CareerOneStop </strong></h3>
<p>CareerOneStop includes hundreds of <a href="http://www.careerinfonet.org/Occupations/select_occupation.aspx?next=occ_rep&level=&optstatus=111111111&id=1&nodeid=2&soccode=&stfips=&jobfam=&menuMode" class="external" target="_blank">occupational profiles</a> with data available by state and metro area. There are links in the left-hand side menu to compare occupational employment by state and occupational wages by local area or metro area. There is also a <a href="http://www.careeronestop.org/SalariesBenefits/Sal_default.aspx" class="external" target="_blank">salary info tool</a> to search for wages by zip code.</p>
','text','State and Area Data','html','
<h4>How to Become an Actor</h4>
<p>Many actors enhance their skills through formal dramatic education, and long-term training is common.</p>
','html','
<h4>More Information, Including Links to O*NET</h4>
<p>Learn more about actors by visiting additional resources, including O*NET, a source on key characteristics of workers and occupations.</p>
','html','
<h4>Job Outlook</h4>
<p>Employment of actors is projected to grow 3 percent from 2019 to 2029, about as fast as the average for all occupations. Growth in the number of Internet-only platforms may lead to work for actors.</p>
','html','
<h4>Pay</h4>
<p>The median hourly wage for actors was $20.43 in May 2019.</p> ','html','
<h4>Similar Occupations</h4>
<p>Compare the job duties, education, job growth, and pay of actors with similar occupations.</p>
','html','
<h4>State and Area Data</h4>
<p>Explore resources for employment and wages by state and area for actors.</p>
','html','
<h4>What Actors Do </h4>
<p>Actors express ideas and portray characters in theater, film, television, and other performing arts media.</p>
','html','
<h4>Work Environment</h4>
<p>Actors work in various settings, including production studios, theaters, and theme parks, or on location. Work assignments are usually short, ranging from 1 day to a few months.</p>
','text','Actors','https://www.youtube.com/watch?v=RrrnUDgW-gU','html','
<p>Actors express ideas and portray characters in theater, film, television, and other performing arts media. They interpret a writer’s script to entertain or inform an audience.</p>
<h3>Duties</h3>
<p>Actors typically do the following:</p>
<ul>
<li>Read scripts and meet with agents and other professionals before accepting a role</li>
<li>Audition in front of directors, producers, and casting directors</li>
<li>Research their character’s personal traits and circumstances to portray the characters more authentically to an audience</li>
<li>Memorize their lines</li>
<li>Rehearse their lines and performance, including on stage or in front of the camera, with other actors</li>
<li>Discuss their role with the director, producer, and other actors to improve the overall performance of the show</li>
<li>Perform the role, following the director’s directions</li>
</ul>
<p>Most actors struggle to find steady work, and few achieve recognition as stars. Some work as “extras”—actors who have no lines to deliver but are included in scenes to give a more realistic setting. Some actors do voiceover or narration work for animated features, audiobooks, or other electronic media.</p>
<p>In some stage or film productions, actors sing, dance, or play a musical instrument. For some roles, an actor must learn a new skill, such as horseback riding or stage fighting.</p>
<p>Most actors have long periods of unemployment between roles and often hold other jobs in order to make a living. Some actors teach acting classes as a second job.</p>
','html','
<img src="/ooh/images/2284.jpg" width="240" height="334" alt="Actors" />
<div class="image-caption" style="width: 230px;">Actors must memorize and rehearse their lines.</div>
','text','What Actors Do','html','
<p>Actors held about 70,100 jobs in 2019. The largest employers of actors were as follows:</p>
<table class="ooh-tab-table">
<tbody>
<tr>
<td>Self-employed workers</td>
<td align="right">24%</td>
</tr>
<tr>
<td>Theater companies and dinner theaters</td>
<td align="right">13</td>
</tr>
<tr>
<td>Colleges, universities, and professional schools; state, local, and private</td>
<td align="right">5</td>
</tr>
<tr>
<td>Professional, scientific, and technical services</td>
<td align="right">5</td>
</tr>
</tbody>
</table>
<p>Work assignments are usually short, ranging from 1 day to a few months, and actors often hold another job in order to make a living. They are frequently under the stress of having to find their next job. Some actors in touring companies may be employed for several years.</p>
<p>Actors may perform in unpleasant conditions, such as outdoors in bad weather, under hot stage lights, or while wearing an uncomfortable costume or makeup.</p>
<h3>Work Schedules</h3>
<p>Work hours for actors are extensive and irregular. Early morning, evening, weekend, and holiday work is common. Some actors work part time. Few actors work full time, and many have variable schedules. Those who work in theater may travel with a touring show across the country. Film and television actors may also travel to work on location.</p>
','html','
<img src="/ooh/images/2286.jpg" width="329" height="240" alt="Actors" />
<div class="image-caption" style="width: 319px;">Some actors wear elaborate makeup and costumes.</div>
','text','Work Environment','2029',null,'Occupational Outlook Handbook','May 2019','2019',null);
INSERT INTO blsoccupationhandbook (current_year,current_year_agg,last_updated,occupation_id,occupation_citation,occupation_description_type,occupation_description,occupation_how_to_become_one_section_body_type,occupation_how_to_become_one_section_body,occupation_how_to_become_one_section_image_type,occupation_how_to_become_one_section_image,occupation_how_to_become_one_section_title_type,occupation_how_to_become_one_section_title,occupation_image_type,occupation_image,occupation_job_outlook_section_body_type,occupation_job_outlook_section_body,occupation_job_outlook_section_chart_type,occupation_job_outlook_section_chart,occupation_job_outlook_section_datatable_type,occupation_job_outlook_section_datatable,occupation_job_outlook_section_title_type,occupation_job_outlook_section_title,occupation_more_information_section_body_type,occupation_more_information_section_body,occupation_more_information_section_title_type,occupation_more_information_section_title,occupation_occupation_code,occupation_occupation_name_full_type,occupation_occupation_name_full,occupation_occupation_name_short_plural_type,occupation_occupation_name_short_plural,occupation_occupation_name_short_singular_type,occupation_occupation_name_short_singular,occupation_pay_section_body_type,occupation_pay_section_body,occupation_pay_section_chart_html_type,occupation_pay_section_chart_html,occupation_pay_section_title_type,occupation_pay_section_title,occupation_publish_date_format,occupation_publish_date_type,occupation_publish_date,occupation_publish_time_format,occupation_publish_time_note,occupation_publish_time_type,occupation_publish_time,occupation_quick_facts_qf_employment_openings_help_type,occupation_quick_facts_qf_employment_openings_help,occupation_quick_facts_qf_employment_openings_value_type,occupation_quick_facts_qf_employment_openings_value,occupation_quick_facts_qf_employment_openings_value_agg,occupation_quick_facts_qf_employment_outlook_description,occupation_quick_facts_qf_employment_outlook_help_type,occupation_quick_facts_qf_employment_outlook_help,occupation_quick_facts_qf_employment_outlook_range_type,occupation_quick_facts_qf_employment_outlook_range,occupation_quick_facts_qf_employment_outlook_value_type,occupation_quick_facts_qf_employment_outlook_value,occupation_quick_facts_qf_employment_outlook_value_agg,occupation_quick_facts_qf_entry_level_education_help_type,occupation_quick_facts_qf_entry_level_education_help,occupation_quick_facts_qf_entry_level_education_value_type,occupation_quick_facts_qf_entry_level_education_value,occupation_quick_facts_qf_median_pay_annual_help_type,occupation_quick_facts_qf_median_pay_annual_help,occupation_quick_facts_qf_median_pay_annual_note_type,occupation_quick_facts_qf_median_pay_annual_note,occupation_quick_facts_qf_median_pay_annual_range_type,occupation_quick_facts_qf_median_pay_annual_range,occupation_quick_facts_qf_median_pay_annual_value_type,occupation_quick_facts_qf_median_pay_annual_value,occupation_quick_facts_qf_median_pay_annual_value_agg,occupation_quick_facts_qf_median_pay_hourly_help_type,occupation_quick_facts_qf_median_pay_hourly_help,occupation_quick_facts_qf_median_pay_hourly_note_type,occupation_quick_facts_qf_median_pay_hourly_note,occupation_quick_facts_qf_median_pay_hourly_value_type,occupation_quick_facts_qf_median_pay_hourly_value,occupation_quick_facts_qf_median_pay_hourly_value_agg,occupation_quick_facts_qf_number_of_jobs_help_type,occupation_quick_facts_qf_number_of_jobs_help,occupation_quick_facts_qf_number_of_jobs_range_type,occupation_quick_facts_qf_number_of_jobs_range,occupation_quick_facts_qf_number_of_jobs_value_type,occupation_quick_facts_qf_number_of_jobs_value,occupation_quick_facts_qf_number_of_jobs_value_agg,occupation_quick_facts_qf_on_the_job_training_help_type,occupation_quick_facts_qf_on_the_job_training_help,occupation_quick_facts_qf_on_the_job_training_value_type,occupation_quick_facts_qf_on_the_job_training_value,occupation_quick_facts_qf_work_experience_help_type,occupation_quick_facts_qf_work_experience_help,occupation_quick_facts_qf_work_experience_value_type,occupation_quick_facts_qf_work_experience_value,occupation_similar_occupations_section_body_type,occupation_similar_occupations_section_body,occupation_similar_occupations_section_title_type,occupation_similar_occupations_section_title,occupation_soc_coverage_soc_code_type,occupation_soc_coverage_soc_code,occupation_state_and_area_section_body_type,occupation_state_and_area_section_body,occupation_state_and_area_section_title_type,occupation_state_and_area_section_title,occupation_summary_how_to_become_one_type,occupation_summary_how_to_become_one,occupation_summary_more_information_type,occupation_summary_more_information,occupation_summary_outlook_type,occupation_summary_outlook,occupation_summary_pay_type,occupation_summary_pay,occupation_summary_similar_occupations_type,occupation_summary_similar_occupations,occupation_summary_state_and_area_type,occupation_summary_state_and_area,occupation_summary_what_they_do_type,occupation_summary_what_they_do,occupation_summary_work_environment_type,occupation_summary_work_environment,occupation_title_type,occupation_title,occupation_video_link,occupation_what_they_do_section_body_type,occupation_what_they_do_section_body,occupation_what_they_do_section_image_type,occupation_what_they_do_section_image,occupation_what_they_do_section_title_type,occupation_what_they_do_section_title,occupation_work_environment_section_body_type,occupation_work_environment_section_body,occupation_work_environment_section_image_type,occupation_work_environment_section_image,occupation_work_environment_section_title_type,occupation_work_environment_section_title,projection_year,projection_year_agg,publication_title,reference_period,reference_year,reference_year_agg) values ('2019',null,'9/2/2020','3','
<!-- BLS CITATION -->
<!-- Suggested Citation -->
<div class="citation">
<h5> Suggested citation:</h5>
<p>Bureau of Labor Statistics, U.S. Department of Labor, <cite>Occupational Outlook Handbook</cite>, Actuaries, <br />
on the Internet at <a href="https://www.bls.gov/ooh/math/actuaries.htm" target="_new">https://www.bls.gov/ooh/math/actuaries.htm</a> (visited <em><!--#config timefmt="%B %d, %Y" --><!--#echo var="DATE_LOCAL" --></em>).</p>
</div>
<!-- /Suggested Citation -->
<!-- /BLS CITATION -->
','text','Actuaries use mathematics, statistics, and financial theory to analyze the financial costs of risk and uncertainty.','html','
<p>Actuaries need a bachelor’s degree, typically in mathematics, actuarial science, statistics, or some other analytical field. Students must complete coursework in economics, applied statistics, and corporate finance, and must pass a series of exams to become certified professionals.</p>
<h3>Education</h3>
<p>Actuaries must have a strong background in mathematics, statistics, and business. Typically, an actuary has an undergraduate degree in mathematics, actuarial science, statistics, or some other analytical field.</p>
<p>To become certified professionals, students must complete coursework in economics, statistics, and corporate finance.</p>
<p>Students also should take classes outside of mathematics and business to prepare them for a career as an actuary. Coursework in computer science, especially programming languages, and the ability to use and develop spreadsheets, databases, and statistical analysis tools, are valuable. Classes in writing and public speaking will improve students’ ability to communicate in the business world.</p>
<h3>Licenses, Certification, and Registrations</h3>
<p>Two professional societies—the <a class="external" href="http://www.casact.org/" target="_blank" rel="noopener noreferrer">Casualty Actuarial Society</a> (CAS) and the <a class="external" href="https://www.soa.org/member/" target="_blank" rel="noopener noreferrer">Society of Actuaries</a> (SOA)—sponsor programs leading to full professional status. The CAS and SOA offer two levels of certification: associate and fellow.</p>
<p>The CAS certifies actuaries who work in the property and casualty field, which includes automobile, homeowners, medical malpractice, and workers’ compensation insurance.</p>
<p>The SOA certifies actuaries who work in life insurance, health insurance, retirement benefits, investments, and finance.</p>
<p>Both professional societies require applicants to complete certain educational coursework in economics, finance, and mathematical statistics while in college. Applicants also must pass seven exams for associate-level certification.</p>
<p>Many employers expect students to have passed at least one or two of the initial actuary exams needed for professional certification before graduation.</p>
<p>In addition, both CAS and SOA require that candidates take seminars on professionalism. Both societies have mandatory e-learning courses for candidates.</p>
<p>It typically takes 4 to 7 years for an actuary to earn the associate-level certification, because each exam requires hundreds of hours of study and months of preparation.</p>
<p>After becoming associates, actuaries typically take 2 to 3 more years to earn fellowship status.</p>
<p>The SOA offers fellowship certification in five separate tracks: life and annuities, group and health benefits, retirement benefits, investments, and finance/enterprise risk management. Unlike the SOA, the CAS does not offer specialized study tracks for fellowship certification.</p>
<p>Both the CAS and the SOA have a continuing education requirement. Most actuaries meet this requirement by attending training seminars that are sponsored by their employers or the societies.</p>
<p>Pension actuaries typically must be licensed by the U.S. Department of Labor and U.S. Department of the Treasury’s <a class="external" href="http://www.irs.gov/Tax-Professionals/Enrolled-Actuaries" target="_blank" rel="noopener noreferrer">Joint Board for the Enrollment of Actuaries</a>. Applicants must meet certain experience requirements and pass two exams administered through the SOA to qualify for enrollment.</p>
<h3>Other Experience</h3>
<p>Because there are different types of practice areas, including health, life, pension, and casualty, internships may be helpful for students deciding on which actuarial track to pursue.</p>
<h3>Training</h3>
<p>Most entry-level actuaries start out as trainees. They are typically on teams with more experienced actuaries who serve as mentors. At first, they perform basic tasks, such as compiling data, but as they gain more experience, they may conduct research and write reports. Beginning actuaries may spend time working in other departments, such as marketing, underwriting, and product development, to learn all aspects of the company’s work and how actuarial work applies to each one.</p>
<p>Most employers support their actuaries throughout the certification process. For example, employers typically pay the cost of exams and study materials. Many firms provide paid time to study and encourage their employees to set up study groups. Employees usually receive raises or bonuses for each exam that they pass.</p>
<h3>Advancement</h3>
<p>Advancement depends largely on job performance and the number of actuarial exams passed. For example, actuaries who achieve fellowship status often supervise the work of other actuaries and provide advice to senior management. Actuaries with a broad knowledge of risk management and how it applies to business can rise to executive positions in their companies, such as chief risk officer or chief financial officer.</p>
<h3>Important Qualities</h3>
<p><strong><em>Analytical skills.</em></strong> Actuaries use analytical skills to identify patterns and trends in complex sets of data to determine the factors that have an effect on certain types of events.</p>
<p><strong><em>Communication skills.</em></strong> Actuaries must be able to explain complex technical matters to those without an actuarial background. They must also communicate clearly through the reports and memos that describe their work and recommendations.</p>
<p><strong><em>Computer skills.</em></strong> Actuaries must know programming languages and be able to use and develop spreadsheets, databases, and statistical analysis tools.</p>
<p><strong><em>Interpersonal skills.</em></strong> Actuaries serve as leaders and members of teams, so they must be able to listen to other people’s opinions and suggestions before reaching a conclusion.</p>
<p><strong><em>Math skills.</em></strong> Actuaries quantify risk by using the principles of calculus, statistics, and probability.</p>
<p><strong><em>Problem-solving skills.</em></strong> Actuaries identify risks and develop ways for businesses to manage those risks.</p>
','html','
<img src="/ooh/images/3641.jpg" width="240" height="336" alt="Actuaries" />
<div class="image-caption" style="width: 230px;">Actuaries need a bachelor�s degree and must pass a series of exams to become certified professionals.</div>
','text','How to Become an Actuary','html','
<img src="/ooh/images/15610.jpg" width="333" height="240" alt="actuaries image" />
<div class="image-caption" style="width: 323px;">Actuaries use advanced statistics and modeling software to forecast the cost and probability of an event.</div>
','html','
<p>Employment of actuaries is projected to grow 18 percent from 2019 to 2029, much faster than the average for all occupations.</p>
<p>Actuaries will be needed to develop, price, and evaluate a variety of insurance products and calculate the costs of new risks.</p>
<p>More actuaries will also be needed to help companies manage their own risk, a practice known as enterprise risk management. Actuaries will help companies avoid, manage, and respond to any potential financial risks across all areas of their business operations. This analysis helps companies adjust their business or investment strategies to achieve economic returns and respond to new financial regulations and requirements.</p>
<p>Insurance companies will need actuaries to analyze the large amount of information, such as medical or property data, collected from consumers. The increase in available data will allow insurance companies to better develop new products, set competitive prices, predict consumer behavior, and make more accurate projections of future risks and costs.</p>
<p>In addition, health insurance companies will require more actuaries to help evaluate the effects of changing healthcare regulations and guidelines, expand into new insurance markets, and offer products to new customers.</p>
<h3>Job Prospects</h3>
<p>Job opportunities should be somewhat competitive for entry-level applicants because the number of students sitting for actuarial exams has increased in the past few years. Students who have passed at least two actuarial exams, have had an internship while in college, and have strong analytical and business skills should have the best job prospects for entry-level positions.</p>
','html','
<!-- CMS Bar Graph --><div class=''ooh-chart'' ><div style="min-height:270.89px;"><h4> Actuaries</h4><p> Percent change in employment, projected 2019-29</p><dl> <dt style="top: -5px;"><span> Mathematical science occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:254.57142857142858px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:254.57142857142858px;" class="positive cms-bar-color-blue"><span style="top:22px;"><span style="left:1px;"> 27% </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Actuaries </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:169.71428571428572px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:169.71428571428572px;" class="positive cms-bar-color-light-blue"><span style="top:22px;"><span style="left:34.0px;"> 18% </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Total, all occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:37.71428571428572px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:37.71428571428572px;" class="positive cms-bar-color-red"><span style="top:22px;"><span style="left:28.0px;"> 4% </span></span></p></div></div></dd> <dt style="height:1.5em;"> </dt><dd class="legend"><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div style="display:none;"><p><span></span></p></div></dd></dl><div class="clearfloat"></div><p class="footer"> Note: All Occupations includes all occupations in the U.S. Economy.<br>Source: U.S. Bureau of Labor Statistics, Employment Projections program</p></div></div><!-- CMS Bar Graph -->
','html','
<table>
<caption>Employment projections data for actuaries, 2019-29</caption>
<thead>
<tr>
<th rowspan="2">Occupational Title</th>
<th rowspan="2">SOC Code</th>
<th rowspan="2">Employment, 2019</th>
<th rowspan="2">Projected Employment, 2029</th>
<th colspan="2">Change, 2019-29</th>
<th rowspan="2" colspan="2">Employment by Industry</th>
</tr>
<tr>
<th>Percent</th>
<th>Numeric</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="8"><p class="footnotes">SOURCE: U.S. Bureau of Labor Statistics, Employment Projections program</p></td>
</tr>
</tfoot>
<tbody>
<tr>
<th><p ><strong> Actuaries</strong></p></th>
<td style="align: right">15-2011</td>
<td style="align: right">27,700</td>
<td style="align: right">32,600</td>
<td style="align: right">18</td>
<td style="align: right">4,900</td>
<td style="align: right"><a href="https://data.bls.gov/projections/nationalMatrix?queryParams=15-2011&ioType=o">Get data</a></td>
</tr>
</tbody>
</table>
','text','Job Outlook','html','
<p>For more information about actuaries, visit</p>
<p><a class="external" href="http://www.actuary.org/" target="_blank" rel="noopener noreferrer">American Academy of Actuaries</a></p>
<p>For more information about actuaries in property and casualty insurance, visit</p>
<p><a class="external" href="http://www.casact.org/" target="_blank" rel="noopener noreferrer">Casualty Actuarial Society</a></p>
<p>For more information about actuaries in life and health insurance, retirement benefits, investments, and finance/enterprise risk management, visit</p>
<p><a class="external" href="http://www.soa.org" target="_blank" rel="noopener noreferrer">Society of Actuaries</a></p>
<p>For more information about how to become an actuary, visit</p>
<p><a class="external" href="http://www.beanactuary.org/" target="_blank" rel="noopener noreferrer">Be an Actuary</a></p>
<p>For more information about pension actuaries and their licensing requirements, visit</p>
<p><a class="external" href="https://www.asppa.org/" target="_blank" rel="noopener noreferrer">American Society of Pension Professionals and Actuaries</a></p>
<p>U.S. Department of Labor and U.S. Department of the Treasury’s <a class="external" href="http://www.irs.gov/Tax-Professionals/Enrolled-Actuaries" target="_blank" rel="noopener noreferrer">Joint Board for the Enrollment of Actuaries</a></p>
<h3>O*NET</h3>
<p><a class="external" target="_blank" href="http://www.onetonline.org/link/summary/15-2011.00" class="onet">Actuaries</a></p>
','text','Contacts for More Information','Y063','text','Actuaries','text','Actuaries','text','Actuary','html','
<p>
The median annual wage for actuaries was $108,350 in May 2019.
The median wage is the wage at which half the workers in an occupation earned more than that amount and half earned less. The lowest 10 percent earned less than $64,860, and the highest 10 percent earned more than $193,600.
</p><p>
</p>
<p>In May 2019, the median annual wages for actuaries in the top industries in which they worked were as follows:</p>
<table class="ooh-tab-table">
<tbody>
<tr>
<td>Professional, scientific, and technical services</td>
<td align="right">
$110,960
</td>
</tr>
<tr>
<td>Finance and insurance</td>
<td align="right">
110,020
</td>
</tr>
<tr>
<td>Government</td>
<td align="right">
101,740
</td>
</tr>
<tr>
<td>Management of companies and enterprises</td>
<td align="right">
98,880
</td>
</tr>
</tbody>
</table>
<p>Most actuaries work full time and some work more than 40 hours per week.</p>
','html','
<!-- CMS Bar Graph --><div class=''ooh-chart'' ><div style="min-height:270.89px;"><h4> Actuaries</h4><p> Median annual wages, May 2019</p><dl> <dt style="top: -5px;"><span> Actuaries </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:263.99512699350265px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:263.99512699350265px;" class="positive cms-bar-color-light-blue"><span style="top:22px;"><span style="left:1px;"> $108,350 </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Mathematical science occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:220.28425871234495px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:220.28425871234495px;" class="positive cms-bar-color-blue"><span style="top:22px;"><span style="left:1px;"> $90,410 </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Total, all occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:96.99719432959243px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:96.99719432959243px;" class="positive cms-bar-color-red"><span style="top:22px;"><span style="left:58.0px;"> $39,810 </span></span></p></div></div></dd> <dt style="height:1.5em;"> </dt><dd class="legend"><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div style="display:none;"><p><span></span></p></div></dd></dl><div class="clearfloat"></div><p class="footer"> Note: All Occupations includes all occupations in the U.S. Economy.<br>Source: U.S. Bureau of Labor Statistics, Occupational Employment Statistics</p></div></div><!-- CMS Bar Graph -->
','text','Pay','yyyy-mm-dd','date','9/1/20','hh:mm','Eastern Daylight Time (EDT)','time','12:00','text','The projected numeric change in employment from 2019 to 2029.','int','4900','4900','Much faster than average','text','The projected percent change in employment from 2019 to 2029. The average growth rate for all occupations is 4 percent.','text','Much faster than average','int','18','18','text','Typical level of education that most workers need to enter this occupation.','text','Bachelor''s degree','text','The wage at which half of the workers in the occupation earned more than that amount and half earned less. Median wage data are from the BLS Occupational Employment Statistics survey. In May 2019, the median annual wage for all workers was $39,810.','text',null,'text','$80,000 or more','int','108350','108350','text','The wage at which half of the workers in the occupation earned more than that amount and half earned less. Median wage data are from the BLS Occupational Employment Statistics survey. In May 2019, the median annual wage for all workers was $39,810.','text',null,'decimal','52.09','52.09','text','The employment, or size, of this occupation in 2019, which is the base year of the 2019-29 employment projections.','text','1,000 to 4,999','int','27700','27700','text','Additional training needed (postemployment) to attain competency in the skills needed in this occupation.','text','Long-term on-the-job training','text','Work experience that is commonly considered necessary by employers, or is a commonly accepted substitute for more formal types of training or education.','text','None','html','
<p>This table shows a list of occupations with job duties that are similar to those of actuaries.</p>
<table>
<thead>
<tr>
<th></th>
<th>Occupation</th>
<th>Job Duties</th>
<th>Entry-Level Education</th>
<th>Median Annual Pay, May 2019</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="/ooh/business-and-financial/accountants-and-auditors.htm">
<img src="/ooh/images/1742.jpg" width="70" height="50" alt="Accountants and auditors" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/accountants-and-auditors.htm"> Accountants and Auditors</a></h4>
</td>
<td>
<p>Accountants and auditors prepare and examine financial records.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="71550">$71,550</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/budget-analysts.htm">
<img src="/ooh/images/1755.jpg" width="70" height="50" alt="Budget analysts" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/budget-analysts.htm"> Budget Analysts</a></h4>
</td>
<td>
<p>Budget analysts help public and private institutions organize their finances.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="76540">$76,540</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/cost-estimators.htm">
<img src="/ooh/images/1715.jpg" width="70" height="50" alt="Cost estimators" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/cost-estimators.htm"> Cost Estimators</a></h4>
</td>
<td>
<p>Cost estimators collect and analyze data in order to estimate the time, money, materials, and labor required to make a product or provide a service.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="65250">$65,250</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/life-physical-and-social-science/economists.htm">
<img src="/ooh/images/1522.jpg" width="68" height="50" alt="Economists" />
</a>
</td>
<td>
<h4><a href="/ooh/life-physical-and-social-science/economists.htm"> Economists</a></h4>
</td>
<td>
<p>Economists collect and analyze data, research trends, and evaluate economic issues for resources, goods, and services.</p>
</td>
<td style="width: 180px">
<span title="7. Master''s degree"> Master''s degree</span>
</td>
<td style="width: 140px">
<span title="105020">$105,020</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/financial-analysts.htm">
<img src="/ooh/images/1757.jpg" width="70" height="50" alt="Financial analysts" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/financial-analysts.htm"> Financial Analysts</a></h4>
</td>
<td>
<p>Financial analysts provide guidance to businesses and individuals making investment decisions.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="81590">$81,590</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/insurance-underwriters.htm">
<img src="/ooh/images/1498.jpg" width="70" height="50" alt="Insurance underwriters" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/insurance-underwriters.htm"> Insurance Underwriters</a></h4>
</td>
<td>
<p>Insurance underwriters evaluate insurance applications and decide whether to provide insurance, and under what terms.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="70020">$70,020</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/math/mathematicians-and-statisticians.htm">
<img src="/ooh/images/1507.jpg" width="70" height="50" alt="Mathematicians" />
</a>
</td>
<td>
<h4><a href="/ooh/math/mathematicians-and-statisticians.htm"> Mathematicians and Statisticians</a></h4>
</td>
<td>
<p>Mathematicians and statisticians analyze data and apply mathematical and statistical techniques to help solve problems.</p>
</td>
<td style="width: 180px">
<span title="7. Master''s degree"> Master''s degree</span>
</td>
<td style="width: 140px">
<span title="92030">$92,030</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/personal-financial-advisors.htm">
<img src="/ooh/images/1766.jpg" width="70" height="50" alt="Personal financial advisors" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/personal-financial-advisors.htm"> Personal Financial Advisors</a></h4>
</td>
<td>
<p>Personal financial advisors provide advice to help individuals manage their finances and plan for their financial future.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="87850">$87,850</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/education-training-and-library/postsecondary-teachers.htm">
<img src="/ooh/images/2162.jpg" width="70" height="50" alt="Postsecondary teachers" />
</a>
</td>
<td>
<h4><a href="/ooh/education-training-and-library/postsecondary-teachers.htm"> Postsecondary Teachers</a></h4>
</td>
<td>
<p>Postsecondary teachers instruct students in a wide variety of academic and technical subjects beyond the high school level.</p>
</td>
<td style="width: 180px">
<span title="9. See How to Become One"><a href="/ooh/education-training-and-library/postsecondary-teachers.htm#tab-4"> See How to Become One</a></span>
</td>
<td style="width: 140px">
<span title="79540">$79,540</span>
</td>
</tr>
</tbody>
</table>
','text','Similar Occupations','text','15-2011','html','
<h3><strong>Occupational Employment Statistics (OES)</strong></h3>
<p>The <a href="https://www.bls.gov/oes/">Occupational Employment Statistics</a> (OES) program produces employment and wage estimates annually for over 800 occupations. These estimates are available for the nation as a whole, for individual states, and for metropolitan and nonmetropolitan areas. The link(s) below go to OES data maps for employment and wages by state and area.</p>
<ul>
<li><a href="https://www.bls.gov/oes/current/oes152011.htm#st">Actuaries</a></li>
</ul>
<h3><strong>Projections Central</strong></h3>
<p>Occupational employment projections are developed for all states by Labor Market Information (LMI) or individual state Employment Projections offices. All state projections data are available at <a href="http://www.projectionscentral.com/" class="external" target="_blank">www.projectionscentral.com</a>. Information on this site allows projected employment growth for an occupation to be compared among states or to be compared within one state. In addition, states may produce projections for areas; there are links to each state’s websites where these data may be retrieved.</p>
<h3><strong>CareerOneStop </strong></h3>
<p>CareerOneStop includes hundreds of <a href="http://www.careerinfonet.org/Occupations/select_occupation.aspx?next=occ_rep&level=&optstatus=111111111&id=1&nodeid=2&soccode=&stfips=&jobfam=&menuMode" class="external" target="_blank">occupational profiles</a> with data available by state and metro area. There are links in the left-hand side menu to compare occupational employment by state and occupational wages by local area or metro area. There is also a <a href="http://www.careeronestop.org/SalariesBenefits/Sal_default.aspx" class="external" target="_blank">salary info tool</a> to search for wages by zip code.</p>
','text','State and Area Data','html','
<h4>How to Become an Actuary</h4>
<p>Actuaries need a bachelor’s degree and must pass a series of exams to become certified professionals. They must have a strong background in mathematics, statistics, and business.</p>
','html','
<h4>More Information, Including Links to O*NET</h4>
<p>Learn more about actuaries by visiting additional resources, including O*NET, a source on key characteristics of workers and occupations.</p>
','html','
<h4>Job Outlook</h4>
<p>Employment of actuaries is projected to grow 18 percent from 2019 to 2029, much faster than the average for all occupations. Actuaries will be needed to develop, price, and evaluate a variety of insurance products and calculate the costs of new, emerging risks.</p>
','html','
<h4>Pay</h4>
<p>The median annual wage for actuaries was $108,350 in May 2019.</p> ','html','
<h4>Similar Occupations</h4>
<p>Compare the job duties, education, job growth, and pay of actuaries with similar occupations.</p>
','html','
<h4>State and Area Data</h4>
<p>Explore resources for employment and wages by state and area for actuaries.</p>
','html','
<h4>What Actuaries Do </h4>
<p>Actuaries use mathematics, statistics, and financial theory to analyze the financial costs of risk and uncertainty.</p>
','html','
<h4>Work Environment</h4>
<p>Most actuaries work for insurance companies. Although most work full time in an office setting, some actuaries who work as consultants may travel to meet with clients.</p>
','text','Actuaries','https://www.youtube.com/watch?v=oy6_S6EzOHw','html','
<p>Actuaries analyze the financial costs of risk and uncertainty. They use mathematics, statistics, and financial theory to assess the risk of potential events, and they help businesses and clients develop policies that minimize the cost of that risk. Actuaries’ work is essential to the insurance industry.</p>
<h3>Duties</h3>
<p>Actuaries typically do the following:</p>
<ul>
<li>Compile statistical data and other information for further analysis</li>
<li>Estimate the probability and likely economic cost of an event such as death, sickness, an accident, or a natural disaster</li>
<li>Design, test, and administer insurance policies, investments, pension plans, and other business strategies to minimize risk and maximize profitability</li>
<li>Produce charts, tables, and reports that explain calculations and proposals</li>
<li>Explain their findings and proposals to company executives, government officials, shareholders, and clients</li>
</ul>
<p>Most actuarial work is done with computers. Actuaries use database software to compile information. They use advanced statistics and modeling software to forecast the probability of an event occurring, the potential costs of the event if it does occur, and whether the insurance company has enough money to pay future claims.</p>
<p>Actuaries typically work on teams that often include managers and professionals in other fields, such as accounting, underwriting, and finance. For example, some actuaries work with <a href="/ooh/business-and-financial/accountants-and-auditors.htm" title="Accountants and Auditors"><u>accountants</u></a> and <a href="/ooh/business-and-financial/financial-analysts.htm" title="Financial Analysts"><u>financial analysts</u></a> to set the price for security offerings or with <a href="/ooh/business-and-financial/market-research-analysts.htm" title="Market Research Analysts"><u>market research analysts</u></a> to forecast demand for new products.</p>
<p>Most actuaries work at insurance companies, where they help design policies and determine the premiums that should be charged for each policy. They must ensure that the premiums are profitable yet competitive with other insurance companies.</p>
<p>Actuaries in the insurance industry typically specialize in a specific field of insurance, such as one of the following:</p>
<p><strong><em>Health insurance actuaries</em></strong> help develop long-term care and health insurance policies by predicting expected costs of providing care under the terms of an insurance contract. Their predictions are based on numerous factors, including family history, geographic location, and occupation.</p>
<p><strong><em>Life insurance actuaries</em></strong> help develop annuity and life insurance policies for individuals and groups by estimating, on the basis of risk factors such as age, gender, and tobacco use, how long someone is expected to live.</p>
<p><strong><em>Property and casualty insurance actuaries</em></strong> help develop insurance policies that insure policyholders against property loss and liability resulting from accidents, natural disasters, fires, and other events. They calculate the expected number of claims resulting from automobile accidents, which varies with the insured person’s age, sex, driving history, type of car, and other factors.</p>
<p>Some actuaries apply their expertise to financial matters outside of the insurance industry. For example, they develop investment strategies that manage risks and maximize returns for companies or individuals.</p>
<p><strong><em>Pension and retirement benefits actuaries</em></strong> design, test, and evaluate company pension plans to determine if the expected funds available in the future will be enough to ensure payment of future benefits. They must report the results of their evaluations to the federal government. Pension actuaries also help businesses develop other types of retirement plans, such as 401(k)s and healthcare plans for retirees. In addition, they provide retirement planning advice to individuals.</p>
<p><strong><em>Enterprise risk actuaries</em></strong> identify any risks, including economic, financial, and geopolitical risks that may affect a company’s short-term or long-term objectives. They help top executives determine how much risk the business is willing to take, and they develop strategies to respond to these issues.</p>
<p>Actuaries also work in the public sector. In the federal government, actuaries may evaluate proposed changes to Social Security or Medicare or conduct economic and demographic studies to project future benefit obligations. At the state level, actuaries may examine and regulate the rates charged by insurance companies.</p>
<p>Some actuaries are considered consultants and provide advice to clients on a contract basis. Many consulting actuaries audit the work of internal actuaries at insurance companies or handle actuarial duties for insurance companies that are not large enough to keep their own actuaries on staff.</p>
','html','
<img src="/ooh/images/1827.jpg" width="336" height="240" alt="Actuaries" />
<div class="image-caption" style="width: 326px;">Actuaries produce charts, tables, and reports to explain their calculations.</div>
','text','What Actuaries Do','html','
<p>Actuaries held about 27,700 jobs in 2019. The largest employers of actuaries were as follows:</p>
<table class="ooh-tab-table">
<tbody>
<tr>
<td>Finance and insurance</td>
<td align="right">71%</td>
</tr>
<tr>
<td>Professional, scientific, and technical services</td>
<td align="right">13</td>
</tr>
<tr>
<td>Management of companies and enterprises</td>
<td align="right">6</td>
</tr>
<tr>
<td>Self-employed workers</td>
<td align="right">4</td>
</tr>
<tr>
<td>Government</td>
<td align="right">3</td>
</tr>
</tbody>
</table>
<p>Actuaries typically work on teams that often include managers and professionals in other fields, such as accounting, underwriting, and finance.</p>
<p>Although actuaries usually work in an office setting, those who work for consulting firms may need to travel to meet with clients.</p>
<h3>Work Schedules</h3>
<p>Most actuaries work full time and some work more than 40 hours per week.</p>
','html','
<img src="/ooh/images/1829.jpg" width="336" height="240" alt="Actuaries" />
<div class="image-caption" style="width: 326px;">Actuaries typically work on teams that often include managers and professionals in other fields, such as accounting, underwriting, and finance.</div>
','text','Work Environment','2029',null,'Occupational Outlook Handbook','May 2019','2019',null);
INSERT INTO blsoccupationhandbook (current_year,current_year_agg,last_updated,occupation_id,occupation_citation,occupation_description_type,occupation_description,occupation_how_to_become_one_section_body_type,occupation_how_to_become_one_section_body,occupation_how_to_become_one_section_image_type,occupation_how_to_become_one_section_image,occupation_how_to_become_one_section_title_type,occupation_how_to_become_one_section_title,occupation_image_type,occupation_image,occupation_job_outlook_section_body_type,occupation_job_outlook_section_body,occupation_job_outlook_section_chart_type,occupation_job_outlook_section_chart,occupation_job_outlook_section_datatable_type,occupation_job_outlook_section_datatable,occupation_job_outlook_section_title_type,occupation_job_outlook_section_title,occupation_more_information_section_body_type,occupation_more_information_section_body,occupation_more_information_section_title_type,occupation_more_information_section_title,occupation_occupation_code,occupation_occupation_name_full_type,occupation_occupation_name_full,occupation_occupation_name_short_plural_type,occupation_occupation_name_short_plural,occupation_occupation_name_short_singular_type,occupation_occupation_name_short_singular,occupation_pay_section_body_type,occupation_pay_section_body,occupation_pay_section_chart_html_type,occupation_pay_section_chart_html,occupation_pay_section_title_type,occupation_pay_section_title,occupation_publish_date_format,occupation_publish_date_type,occupation_publish_date,occupation_publish_time_format,occupation_publish_time_note,occupation_publish_time_type,occupation_publish_time,occupation_quick_facts_qf_employment_openings_help_type,occupation_quick_facts_qf_employment_openings_help,occupation_quick_facts_qf_employment_openings_value_type,occupation_quick_facts_qf_employment_openings_value,occupation_quick_facts_qf_employment_openings_value_agg,occupation_quick_facts_qf_employment_outlook_description,occupation_quick_facts_qf_employment_outlook_help_type,occupation_quick_facts_qf_employment_outlook_help,occupation_quick_facts_qf_employment_outlook_range_type,occupation_quick_facts_qf_employment_outlook_range,occupation_quick_facts_qf_employment_outlook_value_type,occupation_quick_facts_qf_employment_outlook_value,occupation_quick_facts_qf_employment_outlook_value_agg,occupation_quick_facts_qf_entry_level_education_help_type,occupation_quick_facts_qf_entry_level_education_help,occupation_quick_facts_qf_entry_level_education_value_type,occupation_quick_facts_qf_entry_level_education_value,occupation_quick_facts_qf_median_pay_annual_help_type,occupation_quick_facts_qf_median_pay_annual_help,occupation_quick_facts_qf_median_pay_annual_note_type,occupation_quick_facts_qf_median_pay_annual_note,occupation_quick_facts_qf_median_pay_annual_range_type,occupation_quick_facts_qf_median_pay_annual_range,occupation_quick_facts_qf_median_pay_annual_value_type,occupation_quick_facts_qf_median_pay_annual_value,occupation_quick_facts_qf_median_pay_annual_value_agg,occupation_quick_facts_qf_median_pay_hourly_help_type,occupation_quick_facts_qf_median_pay_hourly_help,occupation_quick_facts_qf_median_pay_hourly_note_type,occupation_quick_facts_qf_median_pay_hourly_note,occupation_quick_facts_qf_median_pay_hourly_value_type,occupation_quick_facts_qf_median_pay_hourly_value,occupation_quick_facts_qf_median_pay_hourly_value_agg,occupation_quick_facts_qf_number_of_jobs_help_type,occupation_quick_facts_qf_number_of_jobs_help,occupation_quick_facts_qf_number_of_jobs_range_type,occupation_quick_facts_qf_number_of_jobs_range,occupation_quick_facts_qf_number_of_jobs_value_type,occupation_quick_facts_qf_number_of_jobs_value,occupation_quick_facts_qf_number_of_jobs_value_agg,occupation_quick_facts_qf_on_the_job_training_help_type,occupation_quick_facts_qf_on_the_job_training_help,occupation_quick_facts_qf_on_the_job_training_value_type,occupation_quick_facts_qf_on_the_job_training_value,occupation_quick_facts_qf_work_experience_help_type,occupation_quick_facts_qf_work_experience_help,occupation_quick_facts_qf_work_experience_value_type,occupation_quick_facts_qf_work_experience_value,occupation_similar_occupations_section_body_type,occupation_similar_occupations_section_body,occupation_similar_occupations_section_title_type,occupation_similar_occupations_section_title,occupation_soc_coverage_soc_code_type,occupation_soc_coverage_soc_code,occupation_state_and_area_section_body_type,occupation_state_and_area_section_body,occupation_state_and_area_section_title_type,occupation_state_and_area_section_title,occupation_summary_how_to_become_one_type,occupation_summary_how_to_become_one,occupation_summary_more_information_type,occupation_summary_more_information,occupation_summary_outlook_type,occupation_summary_outlook,occupation_summary_pay_type,occupation_summary_pay,occupation_summary_similar_occupations_type,occupation_summary_similar_occupations,occupation_summary_state_and_area_type,occupation_summary_state_and_area,occupation_summary_what_they_do_type,occupation_summary_what_they_do,occupation_summary_work_environment_type,occupation_summary_work_environment,occupation_title_type,occupation_title,occupation_video_link,occupation_what_they_do_section_body_type,occupation_what_they_do_section_body,occupation_what_they_do_section_image_type,occupation_what_they_do_section_image,occupation_what_they_do_section_title_type,occupation_what_they_do_section_title,occupation_work_environment_section_body_type,occupation_work_environment_section_body,occupation_work_environment_section_image_type,occupation_work_environment_section_image,occupation_work_environment_section_title_type,occupation_work_environment_section_title,projection_year,projection_year_agg,publication_title,reference_period,reference_year,reference_year_agg) values ('2019',null,'9/2/2020','4','
<!-- BLS CITATION -->
<!-- Suggested Citation -->
<div class="citation">
<h5> Suggested citation:</h5>
<p>Bureau of Labor Statistics, U.S. Department of Labor, <cite>Occupational Outlook Handbook</cite>, Administrative Services Managers, <br />
on the Internet at <a href="https://www.bls.gov/ooh/management/administrative-services-managers.htm" target="_new">https://www.bls.gov/ooh/management/administrative-services-managers.htm</a> (visited <em><!--#config timefmt="%B %d, %Y" --><!--#echo var="DATE_LOCAL" --></em>).</p>
</div>
<!-- /Suggested Citation -->
<!-- /BLS CITATION -->
','text','Administrative services managers plan, direct, and coordinate activities that help an organization run efficiently.','html','
<p>Although educational requirements for administrative services managers vary by organization and the work they do, they usually must have a bachelor’s degree and related work experience.</p>
<h3>Education</h3>
<p>Administrative services managers typically need a bachelor’s degree, usually in business or a related field. However, some people enter the occupation with a high school diploma.</p>
<h3>Work Experience</h3>
<p>Administrative services managers must have related work experience that reflects managerial and leadership abilities. Facilities managers should have experience in business operations, project management, and building maintenance, such as from jobs as a <a href="/ooh/installation-maintenance-and-repair/general-maintenance-and-repair-workers.htm" title="General Maintenance and Repair Workers"><u>general maintenance and repair worker</u></a> or a <a href="/ooh/business-and-financial/cost-estimators.htm" title="Cost Estimators"><u>cost estimator</u></a>. Records and information managers should have administrative or business operations experience involving recordkeeping. Records and information managers in the legal field often must have experience as a <a href="/ooh/legal/paralegals-and-legal-assistants.htm" title="Paralegals and Legal Assistants"><u>paralegal or legal assistant</u></a>.</p>
<h3>Licenses, Certifications, and Registrations</h3>
<p>Although it is not required, professional certification may give candidates an advantage when applying for jobs.</p>
<p>Several professional associations for administrative services managers offer certifications. Some associations, including the <a class="external" href="https://www.ifma.org/" target="_blank" rel="noopener noreferrer">International Facility Management Association</a> (IFMA), offer certification that specializes in facility management. Others offering certification include the <a class="external" href="https://www.icrm.org/" target="_blank" rel="noopener noreferrer">Institute of Certified Records Managers</a> (ICRM), for records and information managers, and the <a class="external" href="http://www.arma.org/" target="_blank" rel="noopener noreferrer">ARMA International</a> for those specializing in information governance.</p>
<h3>Important Qualities</h3>
<p><strong><em>Analytical skills.</em></strong> Administrative services managers must be able to review an organization’s procedures for ways to improve efficiency.</p>
<p><strong><em>Communication skills.</em></strong> Administrative services managers often work with others. They must be able to convey ideas clearly, both orally and in writing.</p>
<p><strong><em>Detail oriented.</em></strong> Administrative services managers must pay attention to details across a range of tasks, such as ensuring that the organization complies with building codes and managing the process of buying equipment.</p>
<p><strong><em>Leadership skills.</em></strong> In directing workers and coordinating organizational duties, administrative services managers must be able to motivate employees and handle problems that arise.</p>
','html','
<img src="/ooh/images/1591.jpg" width="240" height="336" alt="Administrative services managers" />
<div class="image-caption" style="width: 230px;">In managing workers and coordinating administrative duties, administrative services managers must show leadership ability.</div>
','text','How to Become an Administrative Services Manager','html','
<img src="/ooh/images/15556.jpg" width="335" height="240" alt="administrative services managers image" />
<div class="image-caption" style="width: 325px;">Administrative services managers keep records, distribute supplies, and maintain facilities.</div>
','html','
<p>Employment of administrative services managers is projected to grow 6 percent from 2019 to 2029, faster than the average for all occupations. Administrative tasks, including facilities management and records and information management, will remain important in a range of industries.</p>
<p>A continuing focus on the environmental impact and energy efficiency of buildings will keep facilities managers in demand. Improving energy efficiency can reduce costs and often is required by regulation. For example, building codes typically ensure that buildings meet environmental standards. Facilities managers will be needed to oversee these improvements in a wide range of areas, from heating and air-conditioning systems to roofing. In addition, facilities managers will be needed to plan for natural disasters, ensuring that any damage to a building will be minimal and that the organization can get back to work quickly.</p>
<p>“Smart building” technology is expected to affect the work of facilities managers over the next decade. This technology will provide facilities managers with timely and detailed information, such as equipment failure alerts and reminders to do maintenance. This information should allow facilities managers to complete their work more efficiently.</p>
<p>Employment of records and information managers also is expected to grow. Demand is expected to be particularly strong for those working in “information governance,” which includes the privacy and legal aspects of records management. As cloud computing and mobile devices become more prevalent, records and information managers will have a critical role in helping organizations develop new records and information management practices and in maintaining data security.</p>
<h3>Job Prospects</h3>
<p>About 26,300 openings for administrative services managers are projected each year, on average, over the decade.</p>
<p>Many of those openings are expected to result from the need to replace workers who transfer to different occupations or exit the labor force, such as to retire.</p>
','html','
<!-- CMS Bar Graph --><div class=''ooh-chart'' ><div style="min-height:270.89px;"><h4> Administrative Services Managers</h4><p> Percent change in employment, projected 2019-29</p><dl> <dt style="top: -5px;"><span> Operations specialties managers </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:198.0px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:198.0px;" class="positive cms-bar-color-blue"><span style="top:22px;"><span style="left:28.0px;"> 9% </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Administrative services managers </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:132.0px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:132.0px;" class="positive cms-bar-color-light-blue"><span style="top:22px;"><span style="left:28.0px;"> 6% </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Total, all occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:88.00000000000001px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:88.00000000000001px;" class="positive cms-bar-color-red"><span style="top:22px;"><span style="left:28.0px;"> 4% </span></span></p></div></div></dd> <dt style="height:1.5em;"> </dt><dd class="legend"><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div style="display:none;"><p><span></span></p></div></dd></dl><div class="clearfloat"></div><p class="footer"> Note: All Occupations includes all occupations in the U.S. Economy.<br>Source: U.S. Bureau of Labor Statistics, Employment Projections program</p></div></div><!-- CMS Bar Graph -->
','html','
<table>
<caption>Employment projections data for administrative services managers, 2019-29</caption>
<thead>
<tr>
<th rowspan="2">Occupational Title</th>
<th rowspan="2">SOC Code</th>
<th rowspan="2">Employment, 2019</th>
<th rowspan="2">Projected Employment, 2029</th>
<th colspan="2">Change, 2019-29</th>
<th rowspan="2" colspan="2">Employment by Industry</th>
</tr>
<tr>
<th>Percent</th>
<th>Numeric</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="8"><p class="footnotes">SOURCE: U.S. Bureau of Labor Statistics, Employment Projections program</p></td>
</tr>
</tfoot>
<tbody>
<tr>
<th><p ><strong> Administrative services and facilities managers</strong></p></th>
<td style="align: right">11-3010</td>
<td style="align: right">325,900</td>
<td style="align: right">347,000</td>
<td style="align: right">6</td>
<td style="align: right">21,200</td>
<td style="align: right"><a href="https://data.bls.gov/projections/nationalMatrix?queryParams=11-3010&ioType=o">Get data</a></td>
</tr>
</tbody>
</table>
','text','Job Outlook','html','
<p>For more information about facilities management and related certifications, visit</p>
<p><a class="external" href="https://www.ifma.org/" target="_blank" rel="noopener noreferrer">International Facility Management Association</a></p>
<p>For more information about records and information management and related certifications, visit</p>
<p><a class="external" href="http://www.arma.org/" target="_blank" rel="noopener noreferrer">ARMA International</a></p>
<p><a class="external" href="https://www.icrm.org/" target="_blank" rel="noopener noreferrer">Institute of Certified Records Managers</a></p>
<h3>O*NET</h3>
<p><a class="external" target="_blank" href="http://www.onetonline.org/link/summary/11-3011.00" class="onet">Administrative Services Managers</a></p>
','text','Contacts for More Information','Y020','text','Administrative Services Managers','text','Administrative Services Managers','text','Administrative Services Manager','html','
<p>
The median annual wage for administrative services managers was $96,940 in May 2019.
The median wage is the wage at which half the workers in an occupation earned more than that amount and half earned less. The lowest 10 percent earned less than $55,210, and the highest 10 percent earned more than $166,330.
</p><p>
</p>
<p>In May 2019, the median annual wages for administrative services managers in the top industries in which they worked were as follows:</p>
<table class="ooh-tab-table">
<tbody>
<tr>
<td>Finance and insurance</td>
<td align="right">
$110,170
</td>
</tr>
<tr>
<td>Professional, scientific, and technical services</td>
<td align="right">
106,760
</td>
</tr>
<tr>
<td>Local government, excluding education and hospitals</td>
<td align="right">
93,770
</td>
</tr>
<tr>
<td>Educational services; state, local, and private</td>
<td align="right">
92,270
</td>
</tr>
<tr>
<td>Healthcare and social assistance</td>
<td align="right">
86,960
</td>
</tr>
</tbody>
</table>
<p>Most administrative services managers work full time. Some work more than 40 hours per week. Facilities managers often are on call to address problems that arise at all hours.</p>
','html','
<!-- CMS Bar Graph --><div class=''ooh-chart'' ><div style="min-height:270.89px;"><h4> Administrative Services Managers</h4><p> Median annual wages, May 2019</p><dl> <dt style="top: -5px;"><span> Operations specialties managers </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:263.99127012995604px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:263.99127012995604px;" class="positive cms-bar-color-blue"><span style="top:22px;"><span style="left:1px;"> $120,960 </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Administrative services managers </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:211.56840051585593px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:211.56840051585593px;" class="positive cms-bar-color-light-blue"><span style="top:22px;"><span style="left:1px;"> $96,940 </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Total, all occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:86.88403161271121px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:86.88403161271121px;" class="positive cms-bar-color-red"><span style="top:22px;"><span style="left:58.0px;"> $39,810 </span></span></p></div></div></dd> <dt style="height:1.5em;"> </dt><dd class="legend"><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div style="display:none;"><p><span></span></p></div></dd></dl><div class="clearfloat"></div><p class="footer"> Note: All Occupations includes all occupations in the U.S. Economy.<br>Source: U.S. Bureau of Labor Statistics, Occupational Employment Statistics</p></div></div><!-- CMS Bar Graph -->
','text','Pay','yyyy-mm-dd','date','9/1/20','hh:mm','Eastern Daylight Time (EDT)','time','12:00','text','The projected numeric change in employment from 2019 to 2029.','int','21200','21200','Faster than average','text','The projected percent change in employment from 2019 to 2029. The average growth rate for all occupations is 4 percent.','text','Faster than average','int','6','6','text','Typical level of education that most workers need to enter this occupation.','text','Bachelor''s degree','text','The wage at which half of the workers in the occupation earned more than that amount and half earned less. Median wage data are from the BLS Occupational Employment Statistics survey. In May 2019, the median annual wage for all workers was $39,810.','text',null,'text','$80,000 or more','int','96940','96940','text','The wage at which half of the workers in the occupation earned more than that amount and half earned less. Median wage data are from the BLS Occupational Employment Statistics survey. In May 2019, the median annual wage for all workers was $39,810.','text',null,'decimal','46.61','46.61','text','The employment, or size, of this occupation in 2019, which is the base year of the 2019-29 employment projections.','text','10,000 to 49,999','int','325900','325900','text','Additional training needed (postemployment) to attain competency in the skills needed in this occupation.','text','None','text','Work experience that is commonly considered necessary by employers, or is a commonly accepted substitute for more formal types of training or education.','text','Less than 5 years','html','
<p>This table shows a list of occupations with job duties that are similar to those of administrative services managers.</p>
<table>
<thead>
<tr>
<th></th>
<th>Occupation</th>
<th>Job Duties</th>
<th>Entry-Level Education</th>
<th>Median Annual Pay, May 2019</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="/ooh/management/compensation-and-benefits-managers.htm">
<img src="/ooh/images/1608.jpg" width="70" height="50" alt="Compensation and benefits managers" />
</a>
</td>
<td>
<h4><a href="/ooh/management/compensation-and-benefits-managers.htm"> Compensation and Benefits Managers</a></h4>
</td>
<td>
<p>Compensation and benefits managers plan, develop, and oversee programs to pay employees.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="122270">$122,270</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/cost-estimators.htm">
<img src="/ooh/images/1715.jpg" width="70" height="50" alt="Cost estimators" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/cost-estimators.htm"> Cost Estimators</a></h4>
</td>
<td>
<p>Cost estimators collect and analyze data in order to estimate the time, money, materials, and labor required to make a product or provide a service.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="65250">$65,250</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/management/human-resources-managers.htm">
<img src="/ooh/images/1621.jpg" width="69" height="50" alt="Human resources managers" />
</a>
</td>
<td>
<h4><a href="/ooh/management/human-resources-managers.htm"> Human Resources Managers</a></h4>
</td>
<td>
<p>Human resources managers plan, coordinate, and direct the administrative functions of an organization.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="116720">$116,720</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/management-analysts.htm">
<img src="/ooh/images/1730.jpg" width="70" height="50" alt="Management analysts" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/management-analysts.htm"> Management Analysts</a></h4>
</td>
<td>
<p>Management analysts recommend ways to improve an organization’s efficiency.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="85260">$85,260</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/meeting-convention-and-event-planners.htm">
<img src="/ooh/images/1733.jpg" width="70" height="50" alt="Meeting, convention, and event planners" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/meeting-convention-and-event-planners.htm"> Meeting, Convention, and Event Planners</a></h4>
</td>
<td>
<p>Meeting, convention, and event planners arrange all aspects of events and professional gatherings.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="50600">$50,600</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/management/postsecondary-education-administrators.htm">
<img src="/ooh/images/1655.jpg" width="73" height="50" alt="Postsecondary education administrators" />
</a>
</td>
<td>
<h4><a href="/ooh/management/postsecondary-education-administrators.htm"> Postsecondary Education Administrators</a></h4>
</td>
<td>
<p>Postsecondary education administrators oversee student services, academics, and faculty research at colleges and universities.</p>
</td>
<td style="width: 180px">
<span title="7. Master''s degree"> Master''s degree</span>
</td>
<td style="width: 140px">
<span title="95410">$95,410</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/management/property-real-estate-and-community-association-managers.htm">
<img src="/ooh/images/1691.jpg" width="70" height="50" alt="Property and community association managers" />
</a>
</td>
<td>
<h4><a href="/ooh/management/property-real-estate-and-community-association-managers.htm"> Property, Real Estate, and Community Association Managers</a></h4>
</td>
<td>
<p>Property, real estate, and community association managers take care of the many aspects of residential, commercial, or industrial properties.</p>
</td>
<td style="width: 180px">
<span title="2. High school diploma or equivalent"> High school diploma or equivalent</span>
</td>
<td style="width: 140px">
<span title="58760">$58,760</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/business-and-financial/purchasing-managers-buyers-and-purchasing-agents.htm">
<img src="/ooh/images/3234.jpg" width="72" height="50" alt="Purchasing managers, buyers, and purchasing agents" />
</a>
</td>
<td>
<h4><a href="/ooh/business-and-financial/purchasing-managers-buyers-and-purchasing-agents.htm"> Purchasing Managers, Buyers, and Purchasing Agents</a></h4>
</td>
<td>
<p>Buyers and purchasing agents buy products and services for organizations. Purchasing managers oversee the work of buyers and purchasing agents.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="69600">$69,600</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/management/top-executives.htm">
<img src="/ooh/images/1699.jpg" width="71" height="50" alt="Top executives" />
</a>
</td>
<td>
<h4><a href="/ooh/management/top-executives.htm"> Top Executives</a></h4>
</td>
<td>
<p>Top executives plan strategies and policies to ensure that an organization meets its goals.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="104690">$104,690</span>
</td>
</tr>
</tbody>
</table>
','text','Similar Occupations','text','11-3010','html','
<h3><strong>Occupational Employment Statistics (OES)</strong></h3>
<p>The <a href="https://www.bls.gov/oes/">Occupational Employment Statistics</a> (OES) program produces employment and wage estimates annually for over 800 occupations. These estimates are available for the nation as a whole, for individual states, and for metropolitan and nonmetropolitan areas. The link(s) below go to OES data maps for employment and wages by state and area.</p>
<ul>
<li><a href="https://www.bls.gov/oes/current/oes113010.htm#st">Administrative services and facilities managers</a></li>
</ul>
<h3><strong>Projections Central</strong></h3>
<p>Occupational employment projections are developed for all states by Labor Market Information (LMI) or individual state Employment Projections offices. All state projections data are available at <a href="http://www.projectionscentral.com/" class="external" target="_blank">www.projectionscentral.com</a>. Information on this site allows projected employment growth for an occupation to be compared among states or to be compared within one state. In addition, states may produce projections for areas; there are links to each state’s websites where these data may be retrieved.</p>
<h3><strong>CareerOneStop </strong></h3>
<p>CareerOneStop includes hundreds of <a href="http://www.careerinfonet.org/Occupations/select_occupation.aspx?next=occ_rep&level=&optstatus=111111111&id=1&nodeid=2&soccode=&stfips=&jobfam=&menuMode" class="external" target="_blank">occupational profiles</a> with data available by state and metro area. There are links in the left-hand side menu to compare occupational employment by state and occupational wages by local area or metro area. There is also a <a href="http://www.careeronestop.org/SalariesBenefits/Sal_default.aspx" class="external" target="_blank">salary info tool</a> to search for wages by zip code.</p>
','text','State and Area Data','html','
<h4>How to Become an Administrative Services Manager</h4>
<p>Although administrative services managers’ educational requirements vary by organization and the work they do, they usually must have a bachelor’s degree and related work experience.</p>
','html','
<h4>More Information, Including Links to O*NET</h4>
<p>Learn more about administrative services managers by visiting additional resources, including O*NET, a source on key characteristics of workers and occupations.</p>
','html','
<h4>Job Outlook</h4>
<p>Employment of administrative services managers is projected to grow 6 percent from 2019 to 2029, faster than the average for all occupations. Tasks such as managing facilities and preparing for emergencies will remain important in a range of industries.</p>
','html','
<h4>Pay</h4>
<p>The median annual wage for administrative services managers was $96,940 in May 2019.</p> ','html','
<h4>Similar Occupations</h4>
<p>Compare the job duties, education, job growth, and pay of administrative services managers with similar occupations.</p>
','html','
<h4>State and Area Data</h4>
<p>Explore resources for employment and wages by state and area for administrative services managers.</p>
','html','
<h4>What Administrative Services Managers Do </h4>
<p>Administrative services managers plan, direct, and coordinate activities that help an organization run efficiently.</p>
','html','
<h4>Work Environment</h4>
<p>Most administrative services managers work full time. Some work more than 40 hours per week.</p>
','text','Administrative Services Managers','https://www.youtube.com/watch?v=vd_bjToRF3Y','html','
<p>Administrative services managers plan, direct, and coordinate activities that help an organization run efficiently. The specific responsibilities vary, but these managers typically maintain facilities and supervise activities that include recordkeeping, mail distribution, and office upkeep. In a small organization, they may direct all support services and may be called the <em>business office manager</em>. Large organizations may have several layers of administrative managers who specialize in different areas.</p>
<h3>Duties</h3>
<p>Administrative services managers typically do the following:</p>
<ul>
<li>Supervise clerical and administrative staff</li>
<li>Set goals and deadlines for their department</li>
<li>Develop, manage, and monitor records</li>
<li>Recommend changes to policies or procedures in order to improve operations, such as reassessing supplies or recordkeeping</li>
<li>Monitor facilities to make sure that they remain safe, secure, and well maintained</li>
<li>Oversee the maintenance and repair of machinery, equipment, and electrical and mechanical systems</li>
<li>Make sure that facilities meet environmental, health, and security standards and comply with regulations</li>
</ul>
<p>Administrative services managers plan, coordinate, and direct a broad range of activities that allow organizations to run efficiently. An organization may have several managers who oversee services for multiple departments, such as mail, printing and copying, recordkeeping, security, building maintenance, and recycling.</p>
<p>Specific tasks and responsibilities may vary. For example, an administrative services manager might be responsible for making sure that the organization has the supplies and services it needs. An administrative services manager who coordinates space allocation might consider employee morale and available funds when determining how to arrange a physical space.</p>
<p>Administrative services managers may examine energy consumption patterns, technology use, and office equipment. They also may plan for maintenance and replacement of equipment, such as computers.</p>
<p>The following are examples of types of administrative services managers:</p>
<p><strong><em>Facilities managers</em></strong> oversee buildings, grounds, equipment, and supplies. Their responsibilities cover several categories, including operations, maintenance, and planning and managing projects.</p>
<p>Facilities managers may oversee renovation projects to improve efficiency or to meet regulations and environmental, health, and security standards. For example, they may recommend energy-saving alternatives or efficiencies that reduce waste. In addition, they continually monitor facilities to ensure that the premises are safe, secure, and well maintained. Facilities managers also direct staff, including <a href="/ooh/building-and-grounds-cleaning/grounds-maintenance-workers.htm" title="Grounds Maintenance Workers"><u>grounds maintenance workers</u></a>, <a href="/ooh/building-and-grounds-cleaning/janitors-and-building-cleaners.htm" title="Janitors and Building Cleaners"><u>janitors and building cleaners</u></a>, and <a href="/ooh/installation-maintenance-and-repair/general-maintenance-and-repair-workers.htm" title="General Maintenance and Repair Workers"><u>general maintenance and repair workers</u></a>.</p>
<p><strong><em>Records and information managers</em></strong> develop, monitor, and manage an organization’s records. They provide information to <a href="/ooh/management/top-executives.htm" title="Top Executives"><u>chief executives</u></a> and ensure that employees follow records and information management guidelines. They may direct the operations of onsite or offsite records facilities. These managers also work closely with an organization’s <a href="/ooh/legal/lawyers.htm" title="Lawyers"><u>attorneys</u></a> and its technology and business operations staff. Records and information managers do not handle medical records, which are administered by <a href="/ooh/management/medical-and-health-services-managers.htm" title="Medical and Health Services Managers"><u>medical and health services managers</u></a>.</p>
','html','
<img src="/ooh/images/1589.jpg" width="336" height="240" alt="Administrative services managers" />
<div class="image-caption" style="width: 326px;">Administrative services managers plan, coordinate, and direct a broad range of services that allow organizations to operate efficiently.</div>
','text','What Administrative Services Managers Do','html','
<p>Administrative services managers held about 325,900 jobs in 2019. The largest employers of administrative services managers were as follows:</p>
<table class="ooh-tab-table">
<tbody>
<tr>
<td>Healthcare and social assistance</td>
<td align="right">13%</td>
</tr>
<tr>
<td>Educational services; state, local, and private</td>
<td align="right">12</td>
</tr>
<tr>
<td>Professional, scientific, and technical services</td>
<td align="right">10</td>
</tr>
<tr>
<td>Local government, excluding education and hospitals</td>
<td align="right">8</td>
</tr>
<tr>
<td>Finance and insurance</td>
<td align="right">7</td>
</tr>
</tbody>
</table>
<p>Administrative services managers spend much of their day in an office. They may observe workers throughout the building, go outdoors to supervise groundskeeping activities, or visit other facilities they direct.</p>
<h3>Work Schedules</h3>
<p>Most administrative services managers work full time. Some work more than 40 hours per week. Facilities managers often are on call to address problems that arise at all hours.</p>
','html','
<img src="/ooh/images/1590.jpg" width="336" height="240" alt="Administrative services managers" />
<div class="image-caption" style="width: 326px;">Administrative services managers spend much of their day in an office.</div>
','text','Work Environment','2029',null,'Occupational Outlook Handbook','May 2019','2019',null);
INSERT INTO blsoccupationhandbook (current_year,current_year_agg,last_updated,occupation_id,occupation_citation,occupation_description_type,occupation_description,occupation_how_to_become_one_section_body_type,occupation_how_to_become_one_section_body,occupation_how_to_become_one_section_image_type,occupation_how_to_become_one_section_image,occupation_how_to_become_one_section_title_type,occupation_how_to_become_one_section_title,occupation_image_type,occupation_image,occupation_job_outlook_section_body_type,occupation_job_outlook_section_body,occupation_job_outlook_section_chart_type,occupation_job_outlook_section_chart,occupation_job_outlook_section_datatable_type,occupation_job_outlook_section_datatable,occupation_job_outlook_section_title_type,occupation_job_outlook_section_title,occupation_more_information_section_body_type,occupation_more_information_section_body,occupation_more_information_section_title_type,occupation_more_information_section_title,occupation_occupation_code,occupation_occupation_name_full_type,occupation_occupation_name_full,occupation_occupation_name_short_plural_type,occupation_occupation_name_short_plural,occupation_occupation_name_short_singular_type,occupation_occupation_name_short_singular,occupation_pay_section_body_type,occupation_pay_section_body,occupation_pay_section_chart_html_type,occupation_pay_section_chart_html,occupation_pay_section_title_type,occupation_pay_section_title,occupation_publish_date_format,occupation_publish_date_type,occupation_publish_date,occupation_publish_time_format,occupation_publish_time_note,occupation_publish_time_type,occupation_publish_time,occupation_quick_facts_qf_employment_openings_help_type,occupation_quick_facts_qf_employment_openings_help,occupation_quick_facts_qf_employment_openings_value_type,occupation_quick_facts_qf_employment_openings_value,occupation_quick_facts_qf_employment_openings_value_agg,occupation_quick_facts_qf_employment_outlook_description,occupation_quick_facts_qf_employment_outlook_help_type,occupation_quick_facts_qf_employment_outlook_help,occupation_quick_facts_qf_employment_outlook_range_type,occupation_quick_facts_qf_employment_outlook_range,occupation_quick_facts_qf_employment_outlook_value_type,occupation_quick_facts_qf_employment_outlook_value,occupation_quick_facts_qf_employment_outlook_value_agg,occupation_quick_facts_qf_entry_level_education_help_type,occupation_quick_facts_qf_entry_level_education_help,occupation_quick_facts_qf_entry_level_education_value_type,occupation_quick_facts_qf_entry_level_education_value,occupation_quick_facts_qf_median_pay_annual_help_type,occupation_quick_facts_qf_median_pay_annual_help,occupation_quick_facts_qf_median_pay_annual_note_type,occupation_quick_facts_qf_median_pay_annual_note,occupation_quick_facts_qf_median_pay_annual_range_type,occupation_quick_facts_qf_median_pay_annual_range,occupation_quick_facts_qf_median_pay_annual_value_type,occupation_quick_facts_qf_median_pay_annual_value,occupation_quick_facts_qf_median_pay_annual_value_agg,occupation_quick_facts_qf_median_pay_hourly_help_type,occupation_quick_facts_qf_median_pay_hourly_help,occupation_quick_facts_qf_median_pay_hourly_note_type,occupation_quick_facts_qf_median_pay_hourly_note,occupation_quick_facts_qf_median_pay_hourly_value_type,occupation_quick_facts_qf_median_pay_hourly_value,occupation_quick_facts_qf_median_pay_hourly_value_agg,occupation_quick_facts_qf_number_of_jobs_help_type,occupation_quick_facts_qf_number_of_jobs_help,occupation_quick_facts_qf_number_of_jobs_range_type,occupation_quick_facts_qf_number_of_jobs_range,occupation_quick_facts_qf_number_of_jobs_value_type,occupation_quick_facts_qf_number_of_jobs_value,occupation_quick_facts_qf_number_of_jobs_value_agg,occupation_quick_facts_qf_on_the_job_training_help_type,occupation_quick_facts_qf_on_the_job_training_help,occupation_quick_facts_qf_on_the_job_training_value_type,occupation_quick_facts_qf_on_the_job_training_value,occupation_quick_facts_qf_work_experience_help_type,occupation_quick_facts_qf_work_experience_help,occupation_quick_facts_qf_work_experience_value_type,occupation_quick_facts_qf_work_experience_value,occupation_similar_occupations_section_body_type,occupation_similar_occupations_section_body,occupation_similar_occupations_section_title_type,occupation_similar_occupations_section_title,occupation_soc_coverage_soc_code_type,occupation_soc_coverage_soc_code,occupation_state_and_area_section_body_type,occupation_state_and_area_section_body,occupation_state_and_area_section_title_type,occupation_state_and_area_section_title,occupation_summary_how_to_become_one_type,occupation_summary_how_to_become_one,occupation_summary_more_information_type,occupation_summary_more_information,occupation_summary_outlook_type,occupation_summary_outlook,occupation_summary_pay_type,occupation_summary_pay,occupation_summary_similar_occupations_type,occupation_summary_similar_occupations,occupation_summary_state_and_area_type,occupation_summary_state_and_area,occupation_summary_what_they_do_type,occupation_summary_what_they_do,occupation_summary_work_environment_type,occupation_summary_work_environment,occupation_title_type,occupation_title,occupation_video_link,occupation_what_they_do_section_body_type,occupation_what_they_do_section_body,occupation_what_they_do_section_image_type,occupation_what_they_do_section_image,occupation_what_they_do_section_title_type,occupation_what_they_do_section_title,occupation_work_environment_section_body_type,occupation_work_environment_section_body,occupation_work_environment_section_image_type,occupation_work_environment_section_image,occupation_work_environment_section_title_type,occupation_work_environment_section_title,projection_year,projection_year_agg,publication_title,reference_period,reference_year,reference_year_agg) values ('2019',null,'9/2/2020','5','
<!-- BLS CITATION -->
<!-- Suggested Citation -->
<div class="citation">
<h5> Suggested citation:</h5>
<p>Bureau of Labor Statistics, U.S. Department of Labor, <cite>Occupational Outlook Handbook</cite>, Adult Literacy and High School Equivalency Diploma Teachers, <br />
on the Internet at <a href="https://www.bls.gov/ooh/education-training-and-library/adult-literacy-and-ged-teachers.htm" target="_new">https://www.bls.gov/ooh/education-training-and-library/adult-literacy-and-ged-teachers.htm</a> (visited <em><!--#config timefmt="%B %d, %Y" --><!--#echo var="DATE_LOCAL" --></em>).</p>
</div>
<!-- /Suggested Citation -->
<!-- /BLS CITATION -->
','text','Adult literacy and high school equivalency diploma teachers instruct adults in basic skills, such as reading and speaking English. They also help students earn their high school equivalent diploma.','html','
<p>Adult literacy and high school equivalency diploma teachers who work in public schools must have at least a bachelor’s degree and a license or certification.</p>
<h3><strong>Education</strong></h3>
<p>Adult literacy and high school equivalency diploma teachers in public schools must have at least a bachelor’s degree. Some community colleges may prefer to hire those with a master’s degree or graduate coursework in adult education or English as a Second Language (ESL).</p>
<p>Programs in adult education prepare prospective teachers to use effective strategies for adult learners, work with students from a variety of cultures and backgrounds, and teach adults with learning disabilities. Some programs allow these prospective teachers to specialize in adult basic education, secondary education, or ESL.</p>
<p>Prospective ESL teachers should take courses or training in linguistics and theories of how people learn second languages. Knowledge of a second language is not necessary to teach ESL, but it can be helpful.</p>
<p>Teacher education programs instruct prospective teachers in how to present information to students and how to work with students of varying abilities and backgrounds. Programs typically include an opportunity for student-teachers to work with a mentor and get experience in a classroom. For information about teacher preparation programs in your state, visit <a class="external" href="https://www.teach.org/" target="_blank" rel="noopener noreferrer">Teach.org</a>.</p>
<p>Adult literacy and high school equivalency diploma teachers may take professional development classes to improve their teaching skills and ensure that they keep up with research about teaching adults.</p>
<h3><strong>Licenses, Certifications, and Registrations</strong></h3>
<p>Adult literacy and high school equivalency diploma teachers who work in public schools must have a teaching certificate. Some states have certificates specifically for adult education. Other states require teachers to have a certificate in elementary or secondary education.</p>
<p>To obtain a license, adult literacy and high school equivalency diploma teachers typically need a bachelor’s degree and must complete a student-teaching program. For more information, contact the director of adult education for your state. Contact information is available from the <a class="external" href="https://www2.ed.gov/about/offices/list/ovae/pi/AdultEd/index.html" target="_blank" rel="noopener noreferrer">U.S. Department of Education</a>.</p>
<h3><strong>Important Qualities</strong></h3>
<p><strong><em>Communication skills.</em></strong> Adult literacy and high school equivalency teachers must collaborate with other teachers and program administrators. In addition, they must explain concepts in terms that students can understand.</p>
<p><strong><em>Cultural sensitivity.</em></strong> Teachers work with students from a variety of cultural, educational, and economic backgrounds. They must be respectful of their students’ backgrounds and be understanding of their concerns.</p>
<p><strong><em>Patience.</em></strong> Working with students of different abilities and backgrounds can be difficult. Teachers must be patient when students struggle to understand the material.</p>
<p><strong><em>Resourcefulness.</em></strong> Teachers must be able to think on their feet and find ways to keep students engaged in learning. They may have to change their methods of instruction to address the different needs of their students. </p>
','html','
<img src="/ooh/images/2200.jpg" width="336" height="240" alt="Adult literacy and GED teachers" />
<div class="image-caption" style="width: 326px;">Working with students of different abilities and backgrounds can be difficult and teachers must respond with patience when students struggle with material.</div>
','text','How to Become an Adult Literacy or High School Equivalency Diploma Teacher','html','
<img src="/ooh/images/15262.jpg" width="335" height="240" alt="adult literacy and ged teachers image" />
<div class="image-caption" style="width: 325px;">Adult literacy and high school equivalency diploma teachers instruct adults in basic skills.</div>
','html','
<p>Employment of adult literacy and high school equivalency diploma teachers is projected to decline 10 percent from 2019 to 2029.</p>
<p>Enrollment in adult education and ESL programs has declined in recent years. At the same time, high school graduation rates have increased, reducing the number of adults seeking to obtain high school equivalent diplomas. As these trends continue, the demand for adult literacy and high school equivalency diploma teachers may decline.</p>
<p>Changes in government funding for adult education and ESL programs may impact the demand for adult literacy and high school equivalency diploma teachers.</p>
<h3><strong>Job Prospects</strong></h3>
<p>Many adult literacy and high school equivalency diploma teacher positions are part time. As a result, prospects will be best for workers who are willing and able to take a part-time position. In addition, those with experience teaching will have better opportunities than those without experience.</p>
','html','
<!-- CMS Bar Graph --><div class=''ooh-chart'' ><div style="min-height:270.89px;"><h4> Adult Literacy and High School Equivalency Diploma Teachers</h4><p> Percent change in employment, projected 2019-29</p><dl> <dt style="top: -5px;"><span> Other teachers and instructors </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:66.0px; padding-left:132.0px;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:66.0px;" class="positive cms-bar-color-blue"><span style="top:22px;"><span style="left:28.0px;"> 5% </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Total, all occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:52.800000000000004px; padding-left:132.0px;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:52.800000000000004px;" class="positive cms-bar-color-red"><span style="top:22px;"><span style="left:28.0px;"> 4% </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Adult literacy and high school equivalency diploma teachers </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:132.0px; padding-left:0.0px;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:132.0px;" class="negative cms-bar-color-light-blue"><span style="top:22px;"><span style="right:0px;"> -10% </span></span></p></div></div></dd> <dt style="height:1.5em;"> </dt><dd class="legend"><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div style="display:none;"><p><span></span></p></div></dd></dl><div class="clearfloat"></div><p class="footer"> Note: All Occupations includes all occupations in the U.S. Economy.<br>Source: U.S. Bureau of Labor Statistics, Employment Projections program</p></div></div><!-- CMS Bar Graph -->
','html','
<table>
<caption>Employment projections data for adult literacy and high school equivalency diploma teachers, 2019-29</caption>
<thead>
<tr>
<th rowspan="2">Occupational Title</th>
<th rowspan="2">SOC Code</th>
<th rowspan="2">Employment, 2019</th>
<th rowspan="2">Projected Employment, 2029</th>
<th colspan="2">Change, 2019-29</th>
<th rowspan="2" colspan="2">Employment by Industry</th>
</tr>
<tr>
<th>Percent</th>
<th>Numeric</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="8"><p class="footnotes">SOURCE: U.S. Bureau of Labor Statistics, Employment Projections program</p></td>
</tr>
</tfoot>
<tbody>
<tr>
<th><p ><strong> Adult basic education, adult secondary education, and English as a Second Language instructors</strong></p></th>
<td style="align: right">25-3011</td>
<td style="align: right">59,300</td>
<td style="align: right">53,100</td>
<td style="align: right">-10</td>
<td style="align: right">-6,200</td>
<td style="align: right"><a href="https://data.bls.gov/projections/nationalMatrix?queryParams=25-3011&ioType=o">Get data</a></td>
</tr>
</tbody>
</table>
','text','Job Outlook','html','
<p>For more information about adult education in your state, visit</p>
<p><a class="external" href="https://www2.ed.gov/about/offices/list/ovae/pi/AdultEd/index.html" target="_blank" rel="noopener noreferrer">U.S. Department of Education</a></p>
<p>For more information about teaching and becoming a teacher, visit<strong><br /></strong></p>
<p><a class="external" href="http://www.teach.org" target="_blank" rel="noopener noreferrer">Teach.org </a></p>
<h3>Related BLS articles</h3>
<p><em>Career Outlook</em>: “<span><a href="https://www.bls.gov/careeroutlook/2016/article/education-jobs-teaching-for-a-living.htm">Teaching for a living</a></span>."</p>
<h3>O*NET</h3>
<p><a class="external" target="_blank" href="http://www.onetonline.org/link/summary/25-3011.00" class="onet">Adult Basic and Secondary Education and Literacy Teachers and Instructors</a></p>
','text','Contacts for More Information','Y136','text','Adult Literacy and High School Equivalency Diploma Teachers','text','Adult Literacy and High School Equivalency Diploma Teachers','text','Adult Literacy or High School Equivalency Diploma Teacher','html','
<p>
The median annual wage for adult literacy and high school equivalency diploma teachers was $54,350 in May 2019.
The median wage is the wage at which half the workers in an occupation earned more than that amount and half earned less. The lowest 10 percent earned less than $32,580, and the highest 10 percent earned more than $93,760.
</p><p>
</p>
<p>In May 2019, the median annual wages for adult literacy and high school equivalency diploma teachers in the top industries in which they worked were as follows:</p>
<table class="ooh-tab-table">
<tbody>
<tr>
<td>Elementary and secondary schools; state, local, and private</td>
<td align="right">
$61,630
</td>
</tr>
<tr>
<td>Junior colleges; state, local, and private</td>
<td align="right">
52,500
</td>
</tr>
<tr>
<td>Other schools and instruction; state, local, and private</td>
<td align="right">
48,770
</td>
</tr>
<tr>
<td>Colleges, universities, and professional schools; state, local, and private</td>
<td align="right">
47,580
</td>
</tr>
</tbody>
</table>
<p>Teachers often work in the mornings and evenings, because classes are held at times when students are not at work. They typically work part time.</p>
','html','
<!-- CMS Bar Graph --><div class=''ooh-chart'' ><div style="min-height:270.89px;"><h4> Adult Literacy and High School Equivalency Diploma Teachers</h4><p> Median annual wages, May 2019</p><dl> <dt style="top: -5px;"><span> Adult literacy and high school equivalency diploma teachers </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:263.9902855460701px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:263.9902855460701px;" class="positive cms-bar-color-light-blue"><span style="top:22px;"><span style="left:1px;"> $54,350 </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Total, all occupations </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:193.3662054754195px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:193.3662054754195px;" class="positive cms-bar-color-red"><span style="top:22px;"><span style="left:58.0px;"> $39,810 </span></span></p></div></div></dd> <dt style="top: -5px;"><span> Other teachers and instructors </span></dt><dd style="height: 5em;"><div style="height: 5em;"></div><div style="height: 5em;" class="odd"></div><div style="height: 5em;"></div><div style="height: 5em; border-right:0px solid transparent;" class="odd"></div><div style="height: 5em;" class="value"><div style="height: 5em; width:160.96850161907565px; padding-left:;"><p style="height: 5em; margin: -0.7999999999999994em 0em; width:160.96850161907565px;" class="positive cms-bar-color-blue"><span style="top:22px;"><span style="left:58.0px;"> $33,140 </span></span></p></div></div></dd> <dt style="height:1.5em;"> </dt><dd class="legend"><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div><p><span></span></p></div><div style="display:none;"><p><span></span></p></div></dd></dl><div class="clearfloat"></div><p class="footer"> Note: All Occupations includes all occupations in the U.S. Economy.<br>Source: U.S. Bureau of Labor Statistics, Occupational Employment Statistics</p></div></div><!-- CMS Bar Graph -->
','text','Pay','yyyy-mm-dd','date','9/1/20','hh:mm','Eastern Daylight Time (EDT)','time','12:00','text','The projected numeric change in employment from 2019 to 2029.','int','-6200','-6200','Decline','text','The projected percent change in employment from 2019 to 2029. The average growth rate for all occupations is 4 percent.','text','Decline','int','-10','-10','text','Typical level of education that most workers need to enter this occupation.','text','Bachelor''s degree','text','The wage at which half of the workers in the occupation earned more than that amount and half earned less. Median wage data are from the BLS Occupational Employment Statistics survey. In May 2019, the median annual wage for all workers was $39,810.','text',null,'text','$40,000 to $59,999','int','54350','54350','text','The wage at which half of the workers in the occupation earned more than that amount and half earned less. Median wage data are from the BLS Occupational Employment Statistics survey. In May 2019, the median annual wage for all workers was $39,810.','text',null,'decimal','26.13','26.13','text','The employment, or size, of this occupation in 2019, which is the base year of the 2019-29 employment projections.','text','Declining','int','59300','59300','text','Additional training needed (postemployment) to attain competency in the skills needed in this occupation.','text','None','text','Work experience that is commonly considered necessary by employers, or is a commonly accepted substitute for more formal types of training or education.','text','None','html','
<p>This table shows a list of occupations with job duties that are similar to those of adult literacy and high school equivalency diploma teachers.</p>
<table>
<thead>
<tr>
<th></th>
<th>Occupation</th>
<th>Job Duties</th>
<th>Entry-Level Education</th>
<th>Median Annual Pay, May 2019</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="/ooh/education-training-and-library/career-and-technical-education-teachers.htm">
<img src="/ooh/images/2189.jpg" width="70" height="50" alt="Career and technical education teachers" />
</a>
</td>
<td>
<h4><a href="/ooh/education-training-and-library/career-and-technical-education-teachers.htm"> Career and Technical Education Teachers</a></h4>
</td>
<td>
<p>Career and technical education teachers instruct students in various technical and vocational subjects, such as auto repair, healthcare, and culinary arts.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="58110">$58,110</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/education-training-and-library/high-school-teachers.htm">
<img src="/ooh/images/3445.jpg" width="70" height="50" alt="High school teachers" />
</a>
</td>
<td>
<h4><a href="/ooh/education-training-and-library/high-school-teachers.htm"> High School Teachers</a></h4>
</td>
<td>
<p>High school teachers teach academic lessons and various skills that students will need to attend college and to enter the job market.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="61660">$61,660</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/education-training-and-library/instructional-coordinators.htm">
<img src="/ooh/images/2226.jpg" width="70" height="50" alt="Instructional coordinators" />
</a>
</td>
<td>
<h4><a href="/ooh/education-training-and-library/instructional-coordinators.htm"> Instructional Coordinators</a></h4>
</td>
<td>
<p>Instructional coordinators oversee school curriculums and teaching standards. They develop instructional material, implement it, and assess its effectiveness.</p>
</td>
<td style="width: 180px">
<span title="7. Master''s degree"> Master''s degree</span>
</td>
<td style="width: 140px">
<span title="66290">$66,290</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/education-training-and-library/kindergarten-and-elementary-school-teachers.htm">
<img src="/ooh/images/2174.jpg" width="70" height="50" alt="Kindergarten and elementary school teachers" />
</a>
</td>
<td>
<h4><a href="/ooh/education-training-and-library/kindergarten-and-elementary-school-teachers.htm"> Kindergarten and Elementary School Teachers</a></h4>
</td>
<td>
<p>Kindergarten and elementary school teachers instruct young students in basic subjects in order to prepare them for future schooling.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="59420">$59,420</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/education-training-and-library/librarians.htm">
<img src="/ooh/images/2215.jpg" width="70" height="50" alt="Librarians" />
</a>
</td>
<td>
<h4><a href="/ooh/education-training-and-library/librarians.htm"> Librarians</a></h4>
</td>
<td>
<p>Librarians help people find information and conduct research for personal and professional use.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="59500">$59,500</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/education-training-and-library/middle-school-teachers.htm">
<img src="/ooh/images/2180.jpg" width="70" height="50" alt="Middle school teachers" />
</a>
</td>
<td>
<h4><a href="/ooh/education-training-and-library/middle-school-teachers.htm"> Middle School Teachers</a></h4>
</td>
<td>
<p>Middle school teachers educate students, typically in sixth through eighth grades.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="59660">$59,660</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/education-training-and-library/postsecondary-teachers.htm">
<img src="/ooh/images/2162.jpg" width="70" height="50" alt="Postsecondary teachers" />
</a>
</td>
<td>
<h4><a href="/ooh/education-training-and-library/postsecondary-teachers.htm"> Postsecondary Teachers</a></h4>
</td>
<td>
<p>Postsecondary teachers instruct students in a wide variety of academic and technical subjects beyond the high school level.</p>
</td>
<td style="width: 180px">
<span title="9. See How to Become One"><a href="/ooh/education-training-and-library/postsecondary-teachers.htm#tab-4"> See How to Become One</a></span>
</td>
<td style="width: 140px">
<span title="79540">$79,540</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/community-and-social-service/school-and-career-counselors.htm">
<img src="/ooh/images/15969.jpg" width="70" height="50" alt="School and Career Counselors" />
</a>
</td>
<td>
<h4><a href="/ooh/community-and-social-service/school-and-career-counselors.htm"> School and Career Counselors</a></h4>
</td>
<td>
<p>School counselors help students develop the academic and social skills needed to succeed. Career counselors help people choose a path to employment.</p>
</td>
<td style="width: 180px">
<span title="7. Master''s degree"> Master''s degree</span>
</td>
<td style="width: 140px">
<span title="57040">$57,040</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/community-and-social-service/social-workers.htm">
<img src="/ooh/images/2129.jpg" width="70" height="50" alt="Social workers" />
</a>
</td>
<td>
<h4><a href="/ooh/community-and-social-service/social-workers.htm"> Social Workers</a></h4>
</td>
<td>
<p>Social workers help people solve and cope with problems in their everyday lives.</p>
</td>
<td style="width: 180px">
<span title="9. See How to Become One"><a href="/ooh/community-and-social-service/social-workers.htm#tab-4"> See How to Become One</a></span>
</td>
<td style="width: 140px">
<span title="50470">$50,470</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/education-training-and-library/special-education-teachers.htm">
<img src="/ooh/images/2195.jpg" width="70" height="50" alt="Special education teachers" />
</a>
</td>
<td>
<h4><a href="/ooh/education-training-and-library/special-education-teachers.htm"> Special Education Teachers</a></h4>
</td>
<td>
<p>Special education teachers work with students who have a wide range of learning, mental, emotional, and physical disabilities.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="61030">$61,030</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/education-training-and-library/teacher-assistants.htm">
<img src="/ooh/images/2235.jpg" width="70" height="50" alt="Teacher assistants" />
</a>
</td>
<td>
<h4><a href="/ooh/education-training-and-library/teacher-assistants.htm"> Teacher Assistants</a></h4>
</td>
<td>
<p>Teacher assistants work with a licensed teacher to give students additional attention and instruction.</p>
</td>
<td style="width: 180px">
<span title="3. Some college, no degree"> Some college, no degree</span>
</td>
<td style="width: 140px">
<span title="27920">$27,920</span>
</td>
</tr>
<tr>
<td>
<a href="/ooh/media-and-communication/interpreters-and-translators.htm">
<img src="/ooh/images/2361.jpg" width="70" height="50" alt="Interpreters and translators" />
</a>
</td>
<td>
<h4><a href="/ooh/media-and-communication/interpreters-and-translators.htm"> Interpreters and Translators</a></h4>
</td>
<td>
<p>Interpreters and translators convert information from one language into another language.</p>
</td>
<td style="width: 180px">
<span title="6. Bachelor''s degree"> Bachelor''s degree</span>
</td>
<td style="width: 140px">
<span title="51830">$51,830</span>
</td>
</tr>
</tbody>
</table>
','text','Similar Occupations','text','25-3011','html','
<h3><strong>Occupational Employment Statistics (OES)</strong></h3>
<p>The <a href="https://www.bls.gov/oes/">Occupational Employment Statistics</a> (OES) program produces employment and wage estimates annually for over 800 occupations. These estimates are available for the nation as a whole, for individual states, and for metropolitan and nonmetropolitan areas. The link(s) below go to OES data maps for employment and wages by state and area.</p>
<ul>
<li><a href="https://www.bls.gov/oes/current/oes253011.htm#st">Adult basic education, adult secondary education, and English as a Second Language instructors</a></li>
</ul>
<h3><strong>Projections Central</strong></h3>
<p>Occupational employment projections are developed for all states by Labor Market Information (LMI) or individual state Employment Projections offices. All state projections data are available at <a href="http://www.projectionscentral.com/" class="external" target="_blank">www.projectionscentral.com</a>. Information on this site allows projected employment growth for an occupation to be compared among states or to be compared within one state. In addition, states may produce projections for areas; there are links to each state’s websites where these data may be retrieved.</p>
<h3><strong>CareerOneStop </strong></h3>
<p>CareerOneStop includes hundreds of <a href="http://www.careerinfonet.org/Occupations/select_occupation.aspx?next=occ_rep&level=&optstatus=111111111&id=1&nodeid=2&soccode=&stfips=&jobfam=&menuMode" class="external" target="_blank">occupational profiles</a> with data available by state and metro area. There are links in the left-hand side menu to compare occupational employment by state and occupational wages by local area or metro area. There is also a <a href="http://www.careeronestop.org/SalariesBenefits/Sal_default.aspx" class="external" target="_blank">salary info tool</a> to search for wages by zip code.</p>
','text','State and Area Data','html','
<h4>How to Become an Adult Literacy or High School Equivalency Diploma Teacher</h4>
<p>Adult literacy and high school equivalency diploma teachers who work in public schools must have at least a bachelor’s degree and a license or certification.</p>
','html','
<h4>More Information, Including Links to O*NET</h4>
<p>Learn more about adult literacy and high school equivalency diploma teachers by visiting additional resources, including O*NET, a source on key characteristics of workers and occupations.</p>
','html','
<h4>Job Outlook</h4>
<p>Employment of adult literacy and high school equivalency diploma teachers is projected to decline 10 percent from 2019 to 2029. Declining enrollment in adult education and ESL programs and an increase in the high school graduation rate may lower demand for these types of teachers.</p>
','html','
<h4>Pay</h4>
<p>The median annual wage for adult literacy and high school equivalency diploma teachers was $54,350 in May 2019.</p> ','html','
<h4>Similar Occupations</h4>
<p>Compare the job duties, education, job growth, and pay of adult literacy and high school equivalency diploma teachers with similar occupations.</p>
','html','
<h4>State and Area Data</h4>
<p>Explore resources for employment and wages by state and area for adult literacy and high school equivalency diploma teachers.</p>
','html','
<h4>What Adult Literacy and High School Equivalency Diploma Teachers Do </h4>
<p>Adult literacy and high school equivalency diploma teachers instruct adults in basic skills, such as reading and speaking English. They also help students earn their high school equivalent diploma.</p>
','html','
<h4>Work Environment</h4>
<p>Adult literacy and high school equivalency diploma teachers are often employed by community colleges, community-based organizations, and public schools. They typically work part time.</p>
','text','Adult Literacy and High School Equivalency Diploma Teachers','https://www.youtube.com/watch?v=fxgWjQrwBls','html','
<p>Adult literacy and high school equivalency diploma teachers instruct adults in basic skills, such as reading, writing, and speaking English. They also help students earn their high school equivalent diploma.</p>
<h3><strong>Duties</strong></h3>
<p>Adult literacy and high school equivalency diploma teachers typically do the following:</p>
<ul>
<li>Plan and teach lessons to help students gain the knowledge and skills needed to earn their high school equivalent diploma</li>
<li>Adapt teaching methods based on students’ strengths and weaknesses</li>
<li>Emphasize skills that will help students find jobs, such as learning English words and common phrases used in the workplace</li>
<li>Assess students for learning disabilities</li>
<li>Monitor students’ progress</li>
<li>Help students develop study skills</li>
<li>Connect students to other resources in their community, such as job placement services</li>
</ul>
<p>Students’ educational level and skills are assessed before they enter these programs. Teachers may conduct the assessments; however, sometimes another staff member assesses students. Based on the results of the assessment and the student’s goals, teachers develop an education plan.</p>
<p>Teachers must formally evaluate their students periodically to determine their progress and potential to go on to the next level of classes. However, teachers may informally evaluate their students’ progress continually.</p>
<p>Adult literacy and high school equivalency diploma teachers often have students of various education levels in their classes. As a result, these teachers need to use different strategies to meet the needs of all of their students. They may work with students in classes or teach them one-on-one.</p>
<p>There are three types of education that adult literacy and high school equivalency diploma teachers provide:</p>
<p><strong><em>Adult basic education (ABE)</em></strong> classes teach students the basics of reading, writing, and math. The students generally are age 16 or older and need to gain proficiency in these skills to improve their job situation. Teachers prepare students for further education and help them to develop skills that they will need in the workplace. For example, they may teach students how to write a resume.</p>
<p><strong><em>English as a Second Language (ESL),</em></strong> also called <em>English for Speakers of Other Languages (ESOL)</em>,<em> </em>classes teach students to read, write, and speak English. Students in these classes are immigrants to the United States or those whose native language is not English. ESL teachers may have students from many different countries and cultures in their classroom. Because the ESL teacher and the students may not share a common native language, ESL teachers must be creative with their communication in the classroom.</p>
<p>ESL teachers often focus on helping their students with practical vocabulary for jobs and daily living. They also may focus on preparing their students to take the citizenship exam.</p>
<p><strong><em>High school equivalency and adult secondary education</em></strong> classes prepare students to take the test to earn a high school equivalent diploma. Some programs are combined with career preparation programs so that students can earn a high school equivalent diploma and a career-related credential at the same time.</p>
<p>The high school equivalency exam is composed of four subjects: language arts, math, science, and social studies. In addition to teaching these subjects, teachers also help their students improve their skills in communicating, critical thinking, and problem solving—skills they will need in preparing for further education and successful careers.</p>
','html','
<img src="/ooh/images/15263.jpg" width="224" height="336" alt="adult literacy and ged teachers image" />
<div class="image-caption" style="width: 214px;">Adult literacy and high school equivalency diploma teachers need to use different teaching strategies to meet their students� needs.</div>
','text','What Adult Literacy and High School Equivalency Diploma Teachers Do','html','
<p>Adult literacy and high school equivalency diploma teachers held about 59,300 jobs in 2019. The largest employers of adult literacy and high school equivalency diploma teachers were as follows:</p>
<table class="ooh-tab-table">
<tbody>
<tr>
<td>Elementary and secondary schools; state, local, and private</td>
<td align="right">35%</td>
</tr>
<tr>
<td>Junior colleges; state, local, and private</td>
<td align="right">24</td>
</tr>
<tr>
<td>Other schools and instruction; state, local, and private</td>
<td align="right">9</td>
</tr>
<tr>
<td>Self-employed workers</td>
<td align="right">7</td>
</tr>
<tr>
<td>Colleges, universities, and professional schools; state, local, and private</td>
<td align="right">5</td>
</tr>
</tbody>
</table>
<p>Students in adult literacy and high school equivalency programs attend classes by choice. As a result, they are often highly motivated, which may make teaching them rewarding and satisfying.</p>
<h3><strong>Work Schedules</strong></h3>
<p>Teachers often work in the mornings and evenings, because classes are held at times when students are not at work. They typically work part time.</p>
','html','
<img src="/ooh/images/2199.jpg" width="336" height="240" alt="Adult literacy and GED teachers" />
<div class="image-caption" style="width: 326px;">Adult literacy and high school equivalency diploma teachers often work in community colleges, community-based organizations, and public schools.</div>
','text','Work Environment','2029',null,'Occupational Outlook Handbook','May 2019','2019',null);
|
<reponame>hychrisli-org/Dish-Order-System<filename>DDL/dish-order-system-ddl.sql
DROP DATABASE IF EXISTS dos;
CREATE DATABASE dos;
USE dos;
/*==============================================================*/
/* Table: BRANCH */
/*==============================================================*/
create table BRANCH
(
BRANCH_ID smallint not null,
PHONE char(12) not null,
STREET varchar(50) not null,
CITY varchar(20) not null,
STATE varchar(20) not null,
ZIPCODE char(5) not null,
NAME varchar(20) not null,
primary key (BRANCH_ID)
);
/*==============================================================*/
/* Table: USER */
/*==============================================================*/
create table USER
(
USERNAME varchar(20) not null,
PASSWORD varchar(100) not null,
PHONE char(12),
STREET varchar(50),
CITY varchar(20),
STATE varchar(20),
ZIPCODE char(5),
SIGNUP_DATE date not null,
primary key (USERNAME)
);
create table CUSTOMER
(
USERNAME varchar(20),
constraint customer_pk primary key (username),
constraint customer_fk foreign key (username)
references USER (USERNAME) on delete cascade
);
create table ADMINISTRATOR
(
USERNAME varchar(20),
constraint ADMIN_PK primary key (USERNAME),
constraint ADMIN_FK foreign key (username)
references USER (USERNAME) on delete cascade
);
CREATE TABLE WORKER
(
USERNAME varchar(20),
BRANCH_ID smallint not null,
constraint WORKER_PK primary key (USERNAME, BRANCH_ID),
constraint WORKER_C_FK foreign key (USERNAME)
references USER (USERNAME) on delete cascade,
constraint worker_b_fk foreign key (BRANCH_ID)
references BRANCH (BRANCH_ID)
);
/*==============================================================*/
/* Table: DEFAULT_PAYCARD */
/*==============================================================*/
create table DEFAULT_PAYCARD
(
USERNAME varchar(20) not null,
CARD_NUM varchar(50) not null,
CARD_TYPE varchar(10) not null,
CARDHOLDER_NAME varchar(50) not null,
EXPIRE_DATE date not null,
primary key (USERNAME)
);
alter table DEFAULT_PAYCARD add constraint FK_REFERENCE_6 foreign key (USERNAME)
references USER (USERNAME) on delete restrict on update restrict;
/*==============================================================*/
/* Table: COUPON_DICT */
/*==============================================================*/
create table COUPON_DICT
(
COUPON_ID varchar(20) not null,
VALUE float(5,2) not null,
primary key (COUPON_ID)
);
/*==============================================================*/
/* Table: REWARD */
/*==============================================================*/
create table REWARD
(
REWARD_ID int not null auto_increment,
COUPON_ID varchar(20) not null,
USERNAME varchar(20) not null,
VALID_START date not null,
VALID_END date not null,
USED_DATE date,
primary key (REWARD_ID)
);
alter table REWARD add constraint FK_REFERENCE_7 foreign key (USERNAME)
references USER (USERNAME) on delete restrict on update restrict;
alter table REWARD add constraint FK_REFERENCE_8 foreign key (COUPON_ID)
references COUPON_DICT (COUPON_ID) on delete restrict on update restrict;
/*==============================================================*/
/* Table: DELIVERY_SETTING */
/*==============================================================*/
create table DELIVERY_SETTING
(
BRANCH_ID smallint not null,
PROVIDABLE boolean not null,
FEE float(4,2),
primary key (BRANCH_ID)
);
alter table DELIVERY_SETTING add constraint FK_REFERENCE_3 foreign key (BRANCH_ID)
references BRANCH (BRANCH_ID) on delete restrict on update restrict;
/*==============================================================*/
/* Table: CATALOG_DICT */
/*==============================================================*/
create table CATALOG_DICT
(
CATALOG_ID smallint not null,
NAME varchar(20) not null,
DESCRIPTION varchar(200),
primary key (CATALOG_ID)
);
/*==============================================================*/
/* Table: BRANCH_CATALOG */
/*==============================================================*/
create table BRANCH_CATALOG
(
ID int not null,
BRANCH_ID smallint not null,
CATALOG_ID smallint not null,
primary key (ID)
);
alter table BRANCH_CATALOG add constraint FK_REFERENCE_1 foreign key (CATALOG_ID)
references CATALOG_DICT (CATALOG_ID) on delete restrict on update restrict;
alter table BRANCH_CATALOG add constraint FK_REFERENCE_9 foreign key (BRANCH_ID)
references BRANCH (BRANCH_ID) on delete restrict on update restrict;
/*==============================================================*/
/* Table: DISH_DICT */
/*==============================================================*/
create table DISH_DICT
(
DISH_ID int not null,
CATALOG_ID smallint not null,
NAME varchar(20) not null,
DESCRIPTION varchar(200),
PICTURE_DIR varchar(200),
primary key (DISH_ID)
);
alter table DISH_DICT add constraint FK_REFERENCE_2 foreign key (CATALOG_ID)
references CATALOG_DICT (CATALOG_ID) on delete restrict on update restrict;
/*==============================================================*/
/* Table: DISH */
/*==============================================================*/
create table DISH
(
ID int not null auto_increment,
BRANCH_ID smallint not null,
DISH_ID int not null,
PRICE float(5,2) not null,
INVENTORY_QUANTITY smallint not null,
primary key (ID)
);
alter table DISH add constraint FK_REFERENCE_12 foreign key (BRANCH_ID)
references BRANCH (BRANCH_ID) on delete restrict on update restrict;
alter table DISH add constraint FK_REFERENCE_13 foreign key (DISH_ID)
references DISH_DICT (DISH_ID) on delete restrict on update restrict;
/*==============================================================*/
/* Table: "ORDERS" */
/*==============================================================*/
create table ORDERS
(
ORDER_ID int not null auto_increment,
USERNAME varchar(20) not null,
BRANCH_ID smallint not null,
ORDER_TIME date not null,
TOTAL_PRICE float(7,2) not null,
IS_DELIVER boolean not null,
PICKUP_DELIVER_TIME date,
primary key (ORDER_ID)
);
alter table ORDERS add constraint FK_REFERENCE_4 foreign key (BRANCH_ID)
references BRANCH (BRANCH_ID) on delete restrict on update restrict;
alter table ORDERS add constraint FK_REFERENCE_5 foreign key (USERNAME)
references USER (USERNAME) on delete restrict on update restrict;
/*==============================================================*/
/* Table: ORDER_PAY_INFO */
/*==============================================================*/
create table ORDER_PAY_INFO
(
ORDER_ID int not null,
CARD_NUM varchar(50) not null,
CARD_TYPE varchar(10) not null,
CARDHOLDER_NAME varchar(50) not null,
EXPIRE_DATE date not null,
primary key (ORDER_ID)
);
alter table ORDER_PAY_INFO add constraint FK_REFERENCE_11 foreign key (ORDER_ID)
references ORDERS (ORDER_ID) on delete restrict on update restrict;
/*==============================================================*/
/* Table: DELIVERY_INFO */
/*==============================================================*/
create table DELIVERY_INFO
(
ORDER_ID int not null,
RECEIVER_NAME varchar(20) not null,
PHONE char(12) not null,
STREET varchar(50) not null,
CITY varchar(20) not null,
STATE varchar(20) not null,
ZIPCODE char(5) not null,
primary key (ORDER_ID)
);
alter table DELIVERY_INFO add constraint FK_REFERENCE_10 foreign key (ORDER_ID)
references ORDERS (ORDER_ID) on delete restrict on update restrict;
/*==============================================================*/
/* Table: ORDER_DISH_DETAIL */
/*==============================================================*/
create table ORDER_DISH_DETAIL
(
ID int not null auto_increment,
ORDER_ID int not null,
DISH_ID int not null,
ORDER_QUANTITY smallint not null,
primary key (ID)
);
alter table ORDER_DISH_DETAIL add constraint FK_REFERENCE_14 foreign key (ORDER_ID)
references ORDERS (ORDER_ID) on delete restrict on update restrict;
alter table ORDER_DISH_DETAIL add constraint FK_REFERENCE_15 foreign key (DISH_ID)
references DISH_DICT (DISH_ID) on delete restrict on update restrict;
/*==============================================================*/
/* Table: RATING */
/*==============================================================*/
create table RATING
(
ID int not null auto_increment,
USERNAME varchar(20) not null,
ORDER_ID int not null,
DISH_ID int not null,
SCORE tinyint not null,
TIMESTAMP datetime not null,
COMMENTS varchar(200),
BRANCH_ID smallint,
primary key (ID)
);
alter table RATING add constraint FK_REFERENCE_16 foreign key (USERNAME)
references USER (USERNAME) on delete restrict on update restrict;
alter table RATING add constraint FK_REFERENCE_17 foreign key (ORDER_ID)
references ORDERS (ORDER_ID) on delete restrict on update restrict;
alter table RATING add constraint FK_REFERENCE_18 foreign key (DISH_ID)
references DISH_DICT (DISH_ID) on delete restrict on update restrict;
alter table RATING add constraint FK_REFERENCE_19 foreign key (BRANCH_ID)
references BRANCH (BRANCH_ID) on delete restrict on update restrict;
grant all on dos.* to 'dosuser'@'localhost';
-- -- -- --
SET GLOBAL event_scheduler = ON;
-- trigger for send reward after user comment any dish from an order, and only send out reward for each order
use dos;
DROP TRIGGER IF EXISTS dos.send_commitReword;
DELIMITER $$
CREATE TRIGGER send_commitReword AFTER INSERT ON Rating
FOR EACH ROW
BEGIN
DECLARE rewards Integer;
SELECT count(*) INTO rewards FROM RATING WHERE order_id = NEW.order_id;
IF ( rewards = 1) THEN
INSERT INTO REWARD (coupon_id, username, valid_start,valid_end) VALUES
( 'commentReward',NEW.username, now(), (now() + INTERVAL 20 DAY));
END IF;
END $$
DELIMITER ;
DELIMITER $$
CREATE PROCEDURE dos.autoConfirm()
BEGIN
update orders
set pickup_deliver_time = now()
where DATE_SUB(NOW(), INTERVAL 20 DAY) > order_time and PICKUP_DELIVER_TIME is null;
END $$
DELIMITER ;
DELIMITER $$
CREATE EVENT myevent
ON SCHEDULE EVERY 5 SECOND
STARTS '2017-12-01 00:00:00'
DO
call dos.autoConfirm();
$$
DELIMITER ;
|
<filename>uics-ippower-service-provider/src/test/resources/data/mysql/cleanup-data.sql
delete from sy_area;
delete from t_deviceparam;
delete from t_devicetype;
delete from t_hisdata_63;
delete from t_hisdata_generalair;
delete from t_hisdata_leaking;
delete from t_hisdata_single;
delete from t_hisdata_yzdistribution;
delete from t_historywarn;
delete from t_phpwarn;
delete from t_prideviceinfo;
delete from t_realdata_63;
delete from t_realdata_generalair;
delete from t_realdata_leaking;
delete from t_realdata_single;
delete from t_realdata_yzdistribution;
delete from t_warn_define; |
SET NAMES utf8mb4;
USE `mj`;
-- ----------------------------
-- Table structure for `ag_bill`
-- ----------------------------
CREATE TABLE `ag_bill` (
`index_id` int(11) NOT NULL AUTO_INCREMENT,
`ag_id` int(11) NOT NULL COMMENT '代理商ID,对应游戏id',
`bill_money` int(11) NOT NULL DEFAULT '0' COMMENT '提现金额,分为单位',
`last_week_left` int(11) NOT NULL DEFAULT '0' COMMENT '累计结余金额',
`last_week_balance` int(11) NOT NULL DEFAULT '0' COMMENT '上周提成金额',
`last_week_dakuan` int(11) NOT NULL DEFAULT '0' COMMENT '上周打款金额',
`low_agents_award` int(11) NOT NULL DEFAULT '0' COMMENT '下级代理提成',
`cards_award` int(11) NOT NULL DEFAULT '0' COMMENT '销售玉提成',
`first_buy_award` int(11) NOT NULL DEFAULT '0' COMMENT '首充赠送',
`hongbao` int(11) NOT NULL DEFAULT '0' COMMENT '500分销红包',
`delflag` int(11) NOT NULL DEFAULT '0' COMMENT '已提现标识位',
`start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '结算起始时间',
`end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '结算终止时间',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '结算时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '打款时间',
PRIMARY KEY (`index_id`),
UNIQUE KEY `uidx_start_time_ag_id` (`start_time`,`ag_id`),
KEY `idx_start_time` (`start_time`),
KEY `idx_ag_id` (`ag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='代理商返现明细表';
CREATE TABLE `ag_bill` (
`index_id` int(11) NOT NULL AUTO_INCREMENT,
`ag_id` int(11) NOT NULL COMMENT '代理商ID,对应游戏id',
`bill_money` int(11) NOT NULL DEFAULT '0' COMMENT '提现金额,分为单位',
`last_week_left` int(11) NOT NULL DEFAULT '0' COMMENT '累计结余金额',
`last_week_balance` int(11) NOT NULL DEFAULT '0' COMMENT '上周提成金额',
`last_week_dakuan` int(11) NOT NULL DEFAULT '0' COMMENT '上周打款金额',
`low_agents_award` int(11) NOT NULL DEFAULT '0' COMMENT '下级代理提成',
`cards_award` int(11) NOT NULL DEFAULT '0' COMMENT '销售玉提成',
`first_buy_award` int(11) NOT NULL DEFAULT '0' COMMENT '首充赠送',
`hongbao` int(11) NOT NULL DEFAULT '0' COMMENT '500分销红包',
`delflag` int(11) NOT NULL DEFAULT '0' COMMENT '已提现标识位',
`start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '结算起始时间',
`end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '结算终止时间',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '结算时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '打款时间',
PRIMARY KEY (`index_id`),
UNIQUE KEY `uidx_start_time_ag_id` (`start_time`,`ag_id`),
KEY `idx_start_time` (`start_time`),
KEY `idx_ag_id` (`ag_id`)
) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8mb4 COMMENT='代理商返现明细表';
-- ----------------------------
-- Table structure for `ag_pay`
-- ----------------------------
CREATE TABLE `ag_pay` (
`index_id` int(11) NOT NULL AUTO_INCREMENT,
`ag_id` int(11) NOT NULL COMMENT '代理商ID,对应游戏id',
`customer_id` int(11) NOT NULL COMMENT '下线玩家id,对应游戏id',
`diamond_cnt` int(11) NOT NULL DEFAULT '0' COMMENT '玩家充值钻石数,对应游戏内千胜玉',
`money_cnt` int(11) NOT NULL DEFAULT '0' COMMENT '玩家充值金额',
`delflag` int(11) NOT NULL DEFAULT '0' COMMENT '已结算标识位',
`first_buy_award` int(11) NOT NULL DEFAULT '0' COMMENT '首充奖励,0否 1是',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '下线玩家充值时间',
PRIMARY KEY (`index_id`),
KEY `idx_ag_id` (`ag_id`),
KEY `idx_ag_id_customer_id` (`ag_id`,`customer_id`),
KEY `idx_ag_id_delflag` (`ag_id`,`delflag`),
KEY `idx_ag_id_ag_id` (`ag_id`,`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='下线玩家充值明细表';
-- ----------------------------
-- Table structure for `ag_auth`
-- ----------------------------
CREATE TABLE `ag_auth` (
`index_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '记录索引',
`ag_upper_id` int(11) NOT NULL COMMENT '上级代理商ID,对应游戏id',
`ag_id` int(11) NOT NULL COMMENT '代理商ID,对应游戏id',
`ag_level` int(11) NOT NULL COMMENT '授权等级',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上级代理商授权时间',
PRIMARY KEY (`index_id`),
UNIQUE KEY `uidx_ag_upper_id_ag_id` (`ag_upper_id`,`ag_id`),
KEY `idx_ag_upper_id` (`ag_upper_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='代理商授权表';
-- ----------------------------
-- Table structure for `ag_account`
-- ----------------------------
CREATE TABLE `ag_account` (
`index_id` int(11) NOT NULL AUTO_INCREMENT,
`ag_upper_id` int(11) NOT NULL COMMENT '上级代理商ID,对应游戏id',
`ag_id` int(11) NOT NULL COMMENT '代理商ID,对应游戏id',
`ag_level` int(11) NOT NULL COMMENT '代理商等级',
`password` varchar(64) NOT NULL COMMENT '密码',
`telephone` varchar(64) NOT NULL DEFAULT '' COMMENT '手机号',
`realname` varchar(64) NOT NULL DEFAULT '' COMMENT '真实姓名',
`weixin` varchar(64) NOT NULL DEFAULT '' COMMENT '微信',
`alipay` varchar(64) NOT NULL DEFAULT '' COMMENT '支付宝',
`email` varchar(64) NOT NULL DEFAULT '' COMMENT '电子邮箱',
`hongbao` int(11) NOT NULL DEFAULT '0' COMMENT '分销红包是否领取(0否,1是)',
`total_balance` int(11) NOT NULL DEFAULT '0' COMMENT '总打款金额',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '下级代理商注册时间',
PRIMARY KEY (`index_id`),
UNIQUE KEY `uidx_ag_id` (`ag_id`),
KEY `idx_ag_upper_id` (`ag_upper_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='代理商用户表'; |
CREATE PROCEDURE SP763(OUT MYCOUNT INTEGER) SPECIFIC SP763_96978 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE200;SELECT COUNT(*)INTO MYCOUNT FROM TABLE130;SELECT COUNT(*)INTO MYCOUNT FROM TABLE113;SELECT COUNT(*)INTO MYCOUNT FROM VIEW18;SELECT COUNT(*)INTO MYCOUNT FROM VIEW3;SELECT COUNT(*)INTO MYCOUNT FROM VIEW10;CALL SP218(MYVAR);CALL SP514(MYVAR);CALL SP198(MYVAR);END
GO |
DROP USER IF EXISTS test_user_01074;
CREATE USER test_user_01074;
SELECT '--simple 1';
GRANT SELECT ON *.* TO test_user_01074;
REVOKE SELECT ON db.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--cleanup';
REVOKE SELECT ON *.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--simple 2';
GRANT SELECT ON db.* TO test_user_01074;
REVOKE SELECT ON db.table FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--cleanup';
REVOKE SELECT ON *.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--simple 3';
GRANT SELECT ON db.table TO test_user_01074;
REVOKE SELECT(col1) ON db.table FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--cleanup';
REVOKE SELECT ON *.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--complex 1';
GRANT SELECT ON *.* TO test_user_01074;
REVOKE SELECT(col1, col2) ON db.table FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--cleanup';
REVOKE SELECT ON *.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--complex 2';
GRANT SELECT ON *.* TO test_user_01074;
REVOKE SELECT ON db.* FROM test_user_01074;
GRANT SELECT ON db.table TO test_user_01074;
REVOKE SELECT(col1) ON db.table FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT * FROM system.grants WHERE user_name = 'test_user_01074' format Pretty;
SELECT '--cleanup';
REVOKE SELECT ON *.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--revoke 1';
GRANT SELECT ON *.* TO test_user_01074;
REVOKE SELECT ON db.table FROM test_user_01074;
REVOKE SELECT ON db.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--cleanup';
REVOKE SELECT ON *.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--revoke 2';
GRANT SELECT ON *.* TO test_user_01074;
REVOKE SELECT ON db.table FROM test_user_01074;
GRANT SELECT ON db.* TO test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--cleanup';
REVOKE SELECT ON *.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--grant option 1';
GRANT SELECT ON *.* TO test_user_01074 WITH GRANT OPTION;
REVOKE GRANT OPTION FOR SELECT(col1) ON db.table FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT * FROM system.grants WHERE user_name = 'test_user_01074' format Pretty;
SELECT '--cleanup';
REVOKE SELECT ON *.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--grant option 2';
GRANT SELECT ON *.* TO test_user_01074 WITH GRANT OPTION;
REVOKE SELECT(col1) ON db.table FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--cleanup';
REVOKE SELECT ON *.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--grant option 3';
GRANT SELECT ON *.* TO test_user_01074;
REVOKE GRANT OPTION FOR SELECT(col1) ON db.table FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--cleanup';
REVOKE SELECT ON *.* FROM test_user_01074;
SHOW GRANTS FOR test_user_01074;
SELECT '--grant option 4';
GRANT SELECT ON *.* TO test_user_01074;
REVOKE SELECT ON db.table FROM test_user_01074;
GRANT SELECT ON db.* TO test_user_01074 WITH GRANT OPTION;
SHOW GRANTS FOR test_user_01074;
DROP USER test_user_01074;
|
<reponame>rodel-talampas/gpdb
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
Alter database dsp_db1 set gp_default_storage_options='appendonly=true, orientation=column, compresstype=quicklz';
Alter role dsp_role1 set gp_default_storage_options='appendonly=true, orientation=row, compresstype=zlib';
Alter database dsp_db2 set gp_default_storage_options='appendonly=true,orientation=row, compresstype=quicklz';
Alter role dsp_role2 set gp_default_storage_options='appendonly=true, orientation=column, compresstype=zlib';
Alter database dsp_db3 set gp_default_storage_options='appendonly=true,orientation=row, compresstype=zlib';
Alter role dsp_role3 set gp_default_storage_options='appendonly=true, orientation=column, compresstype=rle_type';
Alter role dsp_role4 reset gp_default_storage_options;
Select datname,datconfig from pg_database where datname in ('dsp_db1', 'dsp_db2', 'dsp_db3');
select rolname, rolconfig from pg_roles where rolname in ('dsp_role1', 'dsp_role2', 'dsp_role3', 'dsp_role4');
|
<reponame>opengauss-mirror/Yat<gh_stars>0
-- @testpoint:opengauss关键字Interval(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists Interval;
create data source Interval;
drop data source Interval;
--关键字带双引号-成功
drop data source if exists "Interval";
create data source "Interval";
drop data source "Interval";
--关键字带单引号-合理报错
drop data source if exists 'Interval';
create data source 'Interval';
--关键字带反引号-合理报错
drop data source if exists `Interval`;
create data source `Interval`;
|
<filename>mymsoft(1).sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 23-02-2022 a las 16:11:24
-- Versión del servidor: 10.4.20-MariaDB
-- Versión de PHP: 8.0.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 */;
--
-- Base de datos: `mymsoft`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `administrador`
--
CREATE TABLE `administrador` (
`idADMINISTRADOR` int(11) NOT NULL,
`idUSUARIO` varchar(45) NOT NULL,
`NOMBRE` varchar(45) NOT NULL,
`idENTRADA` varchar(45) NOT NULL,
`idSALIDA` varchar(45) NOT NULL,
`CARGO` varchar(45) NOT NULL,
`SALIDA_idSALIDA` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `entrada`
--
CREATE TABLE `entrada` (
`idENTRADA` int(11) NOT NULL,
`SUMINISTROS` varchar(45) NOT NULL,
`ALMACEN` varchar(45) NOT NULL,
`CANTIDAD` varchar(45) DEFAULT NULL,
`ENTRADAcol` varchar(45) NOT NULL,
`FECHA_HORA` varchar(45) NOT NULL,
`idUSUARIO` varchar(45) NOT NULL,
`USUARIO_idUSUARIO` int(11) NOT NULL,
`MANTENIMIENTO_idTECNICO` int(11) NOT NULL,
`ADMINISTRADOR_idADMINISTRADOR` int(11) NOT NULL,
`SUMINISTROS_idSUMINISTROS` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `mantenimiento`
--
CREATE TABLE `mantenimiento` (
`idTECNICO` int(11) NOT NULL,
`idUSUARIO` varchar(45) NOT NULL,
`TIPO_MANTENIMIENTO` varchar(45) NOT NULL,
`idADMINISTRADOR` varchar(45) NOT NULL,
`idENTRADA` varchar(45) NOT NULL,
`USUARIO_idUSUARIO` int(11) NOT NULL,
`MAQUINAS_idMAQUINAS` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `maquinas`
--
CREATE TABLE `maquinas` (
`idMAQUINAS` int(11) NOT NULL,
`NOMBRE` varchar(45) NOT NULL,
`TIPO_MANTENIMIENTO` varchar(45) NOT NULL,
`idUSUARIO` varchar(45) NOT NULL,
`idENTRADA` varchar(45) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `salida`
--
CREATE TABLE `salida` (
`idSALIDA` int(11) NOT NULL,
`idSUMINISTRO` varchar(45) NOT NULL,
`idUSUARIO` varchar(45) NOT NULL,
`CANTIDAD` varchar(45) NOT NULL,
`FECHA_HORA` varchar(45) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `suministros`
--
CREATE TABLE `suministros` (
`idSUMINISTROS` int(11) NOT NULL,
`TIPO_SUMINISTRO` varchar(45) NOT NULL,
`idSALIDA` varchar(45) NOT NULL,
`idENTRADA` varchar(45) NOT NULL,
`SALIDA_idSALIDA` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuario`
--
CREATE TABLE `usuario` (
`idUSUARIO` int(11) NOT NULL,
`NOMBRE` varchar(45) NOT NULL,
`APELLIDOS` varchar(45) NOT NULL,
`PROFECCION` varchar(45) NOT NULL,
`CORREO` varchar(45) NOT NULL,
`CONTRASEÑA` varchar(45) NOT NULL,
`DIRECCION` varchar(45) NOT NULL,
`ADMINISTRADOR_idADMINISTRADOR` int(11) NOT NULL,
`MAQUINAS_idMAQUINAS` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `administrador`
--
ALTER TABLE `administrador`
ADD PRIMARY KEY (`idADMINISTRADOR`),
ADD KEY `fk_ADMINISTRADOR_SALIDA1_idx` (`SALIDA_idSALIDA`);
--
-- Indices de la tabla `entrada`
--
ALTER TABLE `entrada`
ADD PRIMARY KEY (`idENTRADA`),
ADD KEY `fk_ENTRADA_USUARIO_idx` (`USUARIO_idUSUARIO`),
ADD KEY `fk_ENTRADA_MANTENIMIENTO1_idx` (`MANTENIMIENTO_idTECNICO`),
ADD KEY `fk_ENTRADA_ADMINISTRADOR1_idx` (`ADMINISTRADOR_idADMINISTRADOR`),
ADD KEY `fk_ENTRADA_SUMINISTROS1_idx` (`SUMINISTROS_idSUMINISTROS`);
--
-- Indices de la tabla `mantenimiento`
--
ALTER TABLE `mantenimiento`
ADD PRIMARY KEY (`idTECNICO`),
ADD KEY `fk_MANTENIMIENTO_USUARIO1_idx` (`USUARIO_idUSUARIO`),
ADD KEY `fk_MANTENIMIENTO_MAQUINAS1_idx` (`MAQUINAS_idMAQUINAS`);
--
-- Indices de la tabla `maquinas`
--
ALTER TABLE `maquinas`
ADD PRIMARY KEY (`idMAQUINAS`);
--
-- Indices de la tabla `salida`
--
ALTER TABLE `salida`
ADD PRIMARY KEY (`idSALIDA`);
--
-- Indices de la tabla `suministros`
--
ALTER TABLE `suministros`
ADD PRIMARY KEY (`idSUMINISTROS`),
ADD KEY `fk_SUMINISTROS_SALIDA1_idx` (`SALIDA_idSALIDA`);
--
-- Indices de la tabla `usuario`
--
ALTER TABLE `usuario`
ADD PRIMARY KEY (`idUSUARIO`),
ADD KEY `fk_USUARIO_ADMINISTRADOR1_idx` (`ADMINISTRADOR_idADMINISTRADOR`),
ADD KEY `fk_USUARIO_MAQUINAS1_idx` (`MAQUINAS_idMAQUINAS`);
--
-- Restricciones para tablas volcadas
--
--
-- Filtros para la tabla `administrador`
--
ALTER TABLE `administrador`
ADD CONSTRAINT `fk_ADMINISTRADOR_SALIDA1` FOREIGN KEY (`SALIDA_idSALIDA`) REFERENCES `salida` (`idSALIDA`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Filtros para la tabla `entrada`
--
ALTER TABLE `entrada`
ADD CONSTRAINT `fk_ENTRADA_ADMINISTRADOR1` FOREIGN KEY (`ADMINISTRADOR_idADMINISTRADOR`) REFERENCES `administrador` (`idADMINISTRADOR`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_ENTRADA_MANTENIMIENTO1` FOREIGN KEY (`MANTENIMIENTO_idTECNICO`) REFERENCES `mantenimiento` (`idTECNICO`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_ENTRADA_SUMINISTROS1` FOREIGN KEY (`SUMINISTROS_idSUMINISTROS`) REFERENCES `suministros` (`idSUMINISTROS`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_ENTRADA_USUARIO` FOREIGN KEY (`USUARIO_idUSUARIO`) REFERENCES `usuario` (`idUSUARIO`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Filtros para la tabla `mantenimiento`
--
ALTER TABLE `mantenimiento`
ADD CONSTRAINT `fk_MANTENIMIENTO_MAQUINAS1` FOREIGN KEY (`MAQUINAS_idMAQUINAS`) REFERENCES `maquinas` (`idMAQUINAS`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_MANTENIMIENTO_USUARIO1` FOREIGN KEY (`USUARIO_idUSUARIO`) REFERENCES `usuario` (`idUSUARIO`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Filtros para la tabla `suministros`
--
ALTER TABLE `suministros`
ADD CONSTRAINT `fk_SUMINISTROS_SALIDA1` FOREIGN KEY (`SALIDA_idSALIDA`) REFERENCES `salida` (`idSALIDA`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Filtros para la tabla `usuario`
--
ALTER TABLE `usuario`
ADD CONSTRAINT `fk_USUARIO_ADMINISTRADOR1` FOREIGN KEY (`ADMINISTRADOR_idADMINISTRADOR`) REFERENCES `administrador` (`idADMINISTRADOR`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_USUARIO_MAQUINAS1` FOREIGN KEY (`MAQUINAS_idMAQUINAS`) REFERENCES `maquinas` (`idMAQUINAS`) ON DELETE NO ACTION ON UPDATE NO ACTION;
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 */;
|
<gh_stars>0
declare
@date_start as int, @date_end as int
set @date_start = dbo.LCToRataDie('01/01/2005')
set @date_end = dbo.LCToRataDie('31/12/2009')
select distinct
txo.TAXON_OCCURRENCE_KEY
,itn2.PREFERRED_NAME as TAXON
,itn2.COMMON_NAME
,txg.TAXON_GROUP_NAME
,dbo.FormatLocation(sa.SAMPLE_KEY) as [SITE]
,sa.SPATIAL_REF as GRIDREF
,dbo.LCFormatVC(sa.LOCATION_KEY) as VC
,dbo.FormatEventRecorders(sa.SAMPLE_KEY) as RECORDERS
,case
when dbo.FormatEventRecorders(sa.SAMPLE_KEY) = dbo.FormatIndividual(deti.title,deti.initials,deti.FORENAME,deti.SURNAME) then
''
else
dbo.FormatIndividual(deti.title,deti.initials,deti.FORENAME,deti.SURNAME)
end as DETERMINER
,dbo.LCReturnVagueDateShort(sa.VAGUE_DATE_START, sa.VAGUE_DATE_END, sa.VAGUE_DATE_TYPE) as [DATE]
,txod.DATA
,'Field Observation' as METHOD
,mq.SHORT_NAME as SEX
,'' as STAGE
,'' as [STATUS]
,dbo.ufn_RtfToPlaintext(ltrim(rtrim(cast(txo.comment as varchar(max))))) as COMMENT
,'[TXO_KEY:' + txo.TAXON_OCCURRENCE_KEY + ']' as COMMENT
from
INDEX_TAXON_NAME itn
inner join
INDEX_TAXON_NAME itn2 on
itn.RECOMMENDED_TAXON_LIST_ITEM_KEY = itn2.TAXON_LIST_ITEM_KEY
inner join
VW_TAXON_GROUP txg on
itn2.TAXON_LIST_ITEM_KEY = txg.TAXON_LIST_ITEM_KEY
inner join
TAXON_DETERMINATION txd on
itn.TAXON_LIST_ITEM_KEY = txd.TAXON_LIST_ITEM_KEY and
txd.PREFERRED = 1
inner join
TAXON_OCCURRENCE txo on
txd.TAXON_OCCURRENCE_KEY = txo.TAXON_OCCURRENCE_KEY
inner join
[SAMPLE] sa on
txo.SAMPLE_KEY = sa.SAMPLE_KEY
inner join
SURVEY_EVENT_RECORDER ser on
sa.SURVEY_EVENT_KEY = ser.SURVEY_EVENT_KEY
inner join
INDIVIDUAL i on
ser.NAME_KEY = i.NAME_KEY
inner join
INDIVIDUAL deti on
txd.DETERMINER = deti.NAME_KEY
inner join
TAXON_OCCURRENCE_DATA txod on
txo.TAXON_OCCURRENCE_KEY = txod.TAXON_OCCURRENCE_KEY
inner join
MEASUREMENT_QUALIFIER mq on
txod.MEASUREMENT_QUALIFIER_KEY = mq.MEASUREMENT_QUALIFIER_KEY
where
txg.TAXON_GROUP_NAME like '%butterfly%'
and sa.VAGUE_DATE_START >= @date_start
and sa.VAGUE_DATE_END <= @date_end
|
<reponame>aubrey-heim/burger<filename>db/schema.sql
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers (
id INT AUTO_INCREMENT NOT NULL,
burger_name varchar(255) NOT NULL,
devoured boolean DEFAULT false,
createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
); |
ALTER TABLE TODOLIST ADD dateCloture DATETIME NULL AFTER dateExecution;
UPDATE CONFIG set version = '8.6';
|
INSERT INTO employee(id,first_name, middle_name, last_name, mobile_number, email, extension_number, employment_type)
VALUES (0,'John', 'Zakaria', ' ', 529853225, '<EMAIL>', 632, 'PERMANENT');
INSERT INTO employee(id,first_name, middle_name, last_name, mobile_number, email, extension_number, employment_type)
VALUES (1,'Kamini', 'Krishna', 'Menon', 566333225, '<EMAIL>', 600, 'INTERN');
INSERT INTO employee (id,first_name, middle_name, last_name, mobile_number, email, extension_number, employment_type)
VALUES (2,'Kalyan', 'Lohitha', 'Warrier',529852369, 'kalyanfarabi.ae', 623, 'CONTRACT');
INSERT INTO employee (id,first_name, middle_name, last_name, mobile_number, email, extension_number, employment_type)
VALUES (3,'Peter', ' ', 'Jones', 236965325, '<EMAIL>', 609, 'PERMANENT');
|
-- tabel Product --
create table product (
id varchar(36) primary key,
code varchar(10) not null unique,
name varchar(255) not null,
price decimal(19,2) not null
) Engine=InnoDB; |
CREATE DATABASE IF NOT EXISTS Final_Project; |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 17, 2020 at 10:17 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
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: `blog`
--
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE `categories` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default.png',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `categories`
--
INSERT INTO `categories` (`id`, `name`, `slug`, `image`, `created_at`, `updated_at`) VALUES
(1, 'Laravel', 'laravel', 'laravel-2020-07-12-5f0b6b061edaf.jpg', '2020-07-12 13:13:01', '2020-07-12 13:56:54'),
(2, 'Codeigniter', 'codeigniter', 'codeigniter-2020-07-12-5f0b6bbc2b0a8.png', '2020-07-12 13:59:56', '2020-07-12 13:59:56');
-- --------------------------------------------------------
--
-- Table structure for table `category_post`
--
CREATE TABLE `category_post` (
`id` bigint(20) UNSIGNED NOT NULL,
`post_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `category_post`
--
INSERT INTO `category_post` (`id`, `post_id`, `category_id`, `created_at`, `updated_at`) VALUES
(1, 1, 1, NULL, NULL),
(2, 2, 2, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `failed_jobs`
--
CREATE TABLE `failed_jobs` (
`id` bigint(20) UNSIGNED NOT NULL,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2019_08_19_000000_create_failed_jobs_table', 1),
(3, '2014_10_12_100000_create_password_resets_table', 2),
(4, '2020_07_09_152318_create_roles_table', 2),
(5, '2020_07_12_054116_create_tags_table', 3),
(6, '2020_07_12_171036_create_categories_table', 4),
(7, '2020_07_17_062403_create_posts_table', 5),
(8, '2020_07_17_062603_create_category_post_table', 5),
(9, '2020_07_17_062724_create_post_tag_table', 5);
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `posts`
--
CREATE TABLE `posts` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default.png',
`body` text COLLATE utf8mb4_unicode_ci NOT NULL,
`view_count` int(11) NOT NULL DEFAULT 0,
`status` tinyint(1) NOT NULL DEFAULT 0,
`is_approved` tinyint(1) NOT NULL DEFAULT 0,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `posts`
--
INSERT INTO `posts` (`id`, `user_id`, `title`, `slug`, `image`, `body`, `view_count`, `status`, `is_approved`, `created_at`, `updated_at`) VALUES
(1, 1, 'First Post', 'first_post', 'default.png', 'This is first post', 0, 0, 1, NULL, NULL),
(2, 2, 'Author Post', 'author_post', 'default.png', 'This is author post', 0, 1, 0, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `post_tag`
--
CREATE TABLE `post_tag` (
`id` bigint(20) UNSIGNED NOT NULL,
`post_id` int(11) NOT NULL,
`tag_id` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `post_tag`
--
INSERT INTO `post_tag` (`id`, `post_id`, `tag_id`, `created_at`, `updated_at`) VALUES
(1, 1, 2, NULL, NULL),
(2, 2, 3, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `roles`
--
CREATE TABLE `roles` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `roles`
--
INSERT INTO `roles` (`id`, `name`, `slug`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'admin', NULL, NULL),
(2, 'Author', 'author', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `tags`
--
CREATE TABLE `tags` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `tags`
--
INSERT INTO `tags` (`id`, `name`, `slug`, `created_at`, `updated_at`) VALUES
(2, 'Laravel', '0', '2020-07-12 01:55:32', '2020-07-12 01:55:32'),
(3, 'Codeigniter', 'Codeigniter', '2020-07-12 03:24:42', '2020-07-12 03:24:42'),
(4, 'Wordpress Update', 'wordpress update', '2020-07-12 03:25:43', '2020-07-12 08:26:31');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`username` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`role_id` int(11) NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sdlfkj',
`about` text COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'dfasdf',
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `username`, `role_id`, `email`, `email_verified_at`, `password`, `image`, `about`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, '<NAME>', 'admin', 1, '<EMAIL>', NULL, '$2y$10$PqlcsYKgnav2MVWKaac0qOAeWEOfwmTuED7TI/B7E7kyqFB5wbb86', 'sdlfkj', 'dfasdf', NULL, NULL, NULL),
(2, '<NAME>', 'author', 2, '<EMAIL>', NULL, '$2y$10$tXhenMqCLWe9SFzuVmKVgO5txwX8xqDuAMNIa7BMsQT8WeUzrqabm', 'sdlfkj', 'dfasdf', NULL, NULL, NULL);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `categories_name_unique` (`name`);
--
-- Indexes for table `category_post`
--
ALTER TABLE `category_post`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `posts`
--
ALTER TABLE `posts`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `posts_slug_unique` (`slug`);
--
-- Indexes for table `post_tag`
--
ALTER TABLE `post_tag`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `tags`
--
ALTER TABLE `tags`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`),
ADD UNIQUE KEY `username` (`username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `category_post`
--
ALTER TABLE `category_post`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `posts`
--
ALTER TABLE `posts`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `post_tag`
--
ALTER TABLE `post_tag`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `tags`
--
ALTER TABLE `tags`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 23, 2017 at 01:06 PM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `projectfw`
--
-- --------------------------------------------------------
--
-- Table structure for table `akta`
--
CREATE TABLE `akta` (
`id` int(10) UNSIGNED NOT NULL,
`nama` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`tgl_lahir` date NOT NULL,
`tgl_terbit` date NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `akta`
--
INSERT INTO `akta` (`id`, `nama`, `tgl_lahir`, `tgl_terbit`, `created_at`, `updated_at`) VALUES
(3, '<NAME>', '1996-12-02', '2017-05-20', '2017-05-19 18:24:11', '2017-05-19 18:24:11'),
(4, 'Haykal', '2010-10-12', '2017-05-20', '2017-05-19 19:23:28', '2017-05-19 19:23:28'),
(5, 'prayogo', '2017-05-17', '2017-05-18', '2017-05-19 21:59:50', '2017-05-19 21:59:50'),
(6, 'yogo', '2017-05-21', '2017-05-30', '2017-05-19 22:03:07', '2017-05-19 22:03:07');
-- --------------------------------------------------------
--
-- Table structure for table `anggota`
--
CREATE TABLE `anggota` (
`id` int(10) UNSIGNED NOT NULL,
`nama_kk` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`jumlah_ak` int(10) UNSIGNED NOT NULL,
`id_kk` int(10) UNSIGNED NOT NULL,
`id_akta` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `kartu_keluarga`
--
CREATE TABLE `kartu_keluarga` (
`id` int(10) UNSIGNED NOT NULL,
`no_kk` int(10) UNSIGNED NOT NULL,
`tgl_terbit` date NOT NULL,
`id_dk` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `kelahiran`
--
CREATE TABLE `kelahiran` (
`id` int(10) UNSIGNED NOT NULL,
`nama` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`tempat_lahir` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`tgl_lahir` date NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `kelahiran`
--
INSERT INTO `kelahiran` (`id`, `nama`, `tempat_lahir`, `tgl_lahir`, `created_at`, `updated_at`) VALUES
(3, 'Siapa', 'samarinda', '2017-05-03', '2017-05-19 19:30:13', '2017-05-19 19:58:47'),
(4, 'Dia', 'Samarinda', '2000-05-27', '2017-05-19 19:58:37', '2017-05-19 19:58:37'),
(5, 'Maka', 'Sangata', '2002-08-25', '2017-05-19 19:59:15', '2017-05-19 19:59:15'),
(6, 'Dian', 'Samarinda', '2000-01-29', '2017-05-19 19:59:59', '2017-05-19 19:59:59'),
(7, 'Lo', 'Bontang', '2012-08-03', '2017-05-19 20:03:21', '2017-05-19 20:03:21');
-- --------------------------------------------------------
--
-- Table structure for table `kelahiran_pend`
--
CREATE TABLE `kelahiran_pend` (
`id` int(10) UNSIGNED NOT NULL,
`id_kelahiran` int(10) UNSIGNED NOT NULL,
`id_dk` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `kematian`
--
CREATE TABLE `kematian` (
`id` int(10) UNSIGNED NOT NULL,
`nama` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`tempat_kematian` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`tgl_kematian` date NOT NULL,
`sebab` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `kematian`
--
INSERT INTO `kematian` (`id`, `nama`, `tempat_kematian`, `tgl_kematian`, `sebab`, `created_at`, `updated_at`) VALUES
(1, 'Lala', 'samarinda', '2017-05-02', 'serangan jantung', '2017-05-19 14:44:06', '2017-05-19 20:01:12'),
(2, 'Fati', 'Samarinda', '2006-04-26', 'Salahh Urat', '2017-05-19 20:00:55', '2017-05-19 20:00:55'),
(3, 'Po', 'Balikpapan', '2002-02-02', 'Demam', '2017-05-19 20:01:47', '2017-05-19 20:01:47'),
(4, 'Dibsi', 'Samarinda', '2003-02-03', 'Jatuh', '2017-05-19 20:02:21', '2017-05-19 20:02:21'),
(5, 'Tinki', 'Sangata', '2004-04-04', 'Kecelakaan', '2017-05-19 20:02:52', '2017-05-19 20:02:52');
-- --------------------------------------------------------
--
-- Table structure for table `kematian_pend`
--
CREATE TABLE `kematian_pend` (
`id` int(10) UNSIGNED NOT NULL,
`id_kematian` int(10) UNSIGNED NOT NULL,
`id_dk` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`migration`, `batch`) VALUES
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2017_05_18_113712_table_akta', 1),
('2017_05_18_113802_table_pengguna', 1),
('2017_05_18_113830_table_data_kependudukan', 1),
('2017_05_18_113835_table_kartu_keluarga', 1),
('2017_05_18_113840_table_anggota_keluarga', 1),
('2017_05_18_113936_table_kelahiran', 1),
('2017_05_18_113955_table_kematian', 1),
('2017_05_18_114015_table_kematian_penduduk', 1),
('2017_05_18_114031_table_kelahiran_penduduk', 1),
('2017_05_18_114124_table_pindah', 1);
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `penduduk`
--
CREATE TABLE `penduduk` (
`id` int(10) UNSIGNED NOT NULL,
`nama` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`tgl_lahir` date NOT NULL,
`alamat` text COLLATE utf8_unicode_ci NOT NULL,
`status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `penduduk`
--
INSERT INTO `penduduk` (`id`, `nama`, `tgl_lahir`, `alamat`, `status`, `created_at`, `updated_at`) VALUES
(7, '<NAME>', '1997-03-24', 'bontang', 'Mahasiswa', '2017-05-19 19:54:48', '2017-05-19 19:54:48'),
(8, '<NAME>', '1997-04-25', 'Bunyu', 'Mahasiswa', '2017-05-19 19:55:48', '2017-05-19 19:55:48'),
(9, '<NAME>', '1997-07-05', 'Bontang', 'Karyawan', '2017-05-19 19:56:33', '2017-05-19 19:56:33'),
(10, '<NAME>', '1997-02-22', 'Balikpapan', 'Mahasiswa', '2017-05-19 19:57:24', '2017-05-19 19:57:24');
-- --------------------------------------------------------
--
-- Table structure for table `pengguna`
--
CREATE TABLE `pengguna` (
`id` int(10) UNSIGNED NOT NULL,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `pengguna`
--
INSERT INTO `pengguna` (`id`, `username`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'admin', '<PASSWORD>', NULL, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `pindah`
--
CREATE TABLE `pindah` (
`id` int(10) UNSIGNED NOT NULL,
`tgl_pindah` date NOT NULL,
`alamat_asal` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`alamat_tujuan` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`id_dk` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `akta`
--
ALTER TABLE `akta`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `anggota`
--
ALTER TABLE `anggota`
ADD PRIMARY KEY (`id`),
ADD KEY `anggota_id_kk_foreign` (`id_kk`),
ADD KEY `anggota_id_akta_foreign` (`id_akta`);
--
-- Indexes for table `kartu_keluarga`
--
ALTER TABLE `kartu_keluarga`
ADD PRIMARY KEY (`id`),
ADD KEY `kartu_keluarga_id_dk_foreign` (`id_dk`);
--
-- Indexes for table `kelahiran`
--
ALTER TABLE `kelahiran`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `kelahiran_pend`
--
ALTER TABLE `kelahiran_pend`
ADD PRIMARY KEY (`id`),
ADD KEY `kelahiran_pend_id_kelahiran_foreign` (`id_kelahiran`),
ADD KEY `kelahiran_pend_id_dk_foreign` (`id_dk`);
--
-- Indexes for table `kematian`
--
ALTER TABLE `kematian`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `kematian_pend`
--
ALTER TABLE `kematian_pend`
ADD PRIMARY KEY (`id`),
ADD KEY `kematian_pend_id_kematian_foreign` (`id_kematian`),
ADD KEY `kematian_pend_id_dk_foreign` (`id_dk`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`),
ADD KEY `password_resets_token_index` (`token`);
--
-- Indexes for table `penduduk`
--
ALTER TABLE `penduduk`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `pengguna`
--
ALTER TABLE `pengguna`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `pindah`
--
ALTER TABLE `pindah`
ADD PRIMARY KEY (`id`),
ADD KEY `pindah_id_dk_foreign` (`id_dk`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `akta`
--
ALTER TABLE `akta`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `anggota`
--
ALTER TABLE `anggota`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `kartu_keluarga`
--
ALTER TABLE `kartu_keluarga`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `kelahiran`
--
ALTER TABLE `kelahiran`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `kelahiran_pend`
--
ALTER TABLE `kelahiran_pend`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `kematian`
--
ALTER TABLE `kematian`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `kematian_pend`
--
ALTER TABLE `kematian_pend`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `penduduk`
--
ALTER TABLE `penduduk`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `pengguna`
--
ALTER TABLE `pengguna`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `pindah`
--
ALTER TABLE `pindah`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `anggota`
--
ALTER TABLE `anggota`
ADD CONSTRAINT `anggota_id_akta_foreign` FOREIGN KEY (`id_akta`) REFERENCES `akta` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `anggota_id_kk_foreign` FOREIGN KEY (`id_kk`) REFERENCES `kartu_keluarga` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `kartu_keluarga`
--
ALTER TABLE `kartu_keluarga`
ADD CONSTRAINT `kartu_keluarga_id_dk_foreign` FOREIGN KEY (`id_dk`) REFERENCES `penduduk` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `kelahiran_pend`
--
ALTER TABLE `kelahiran_pend`
ADD CONSTRAINT `kelahiran_pend_id_dk_foreign` FOREIGN KEY (`id_dk`) REFERENCES `penduduk` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `kelahiran_pend_id_kelahiran_foreign` FOREIGN KEY (`id_kelahiran`) REFERENCES `kelahiran` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `kematian_pend`
--
ALTER TABLE `kematian_pend`
ADD CONSTRAINT `kematian_pend_id_dk_foreign` FOREIGN KEY (`id_dk`) REFERENCES `penduduk` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `kematian_pend_id_kematian_foreign` FOREIGN KEY (`id_kematian`) REFERENCES `kematian` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `pindah`
--
ALTER TABLE `pindah`
ADD CONSTRAINT `pindah_id_dk_foreign` FOREIGN KEY (`id_dk`) REFERENCES `penduduk` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
/*!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 */;
|
/*
Ampla State Database Script to manage the size of the Log and Category Log tables.
*/
declare @utcNow datetime
declare @weeksOld int
declare @countLogs int
set @utcNow = GETUTCDATE()
-- get an indication of the oldest record and size of the Log table.
select @weeksOld = DATEDIFF(WK, logSummary.oldest, @utcNow), @countLogs = logSummary.records
from
(
select min(Timestamp) as oldest, COUNT(1) as records
from dbo.Log
) logSummary
if (@weeksOld > 4)
begin
declare @categoryLogDeleted int
declare @scenarioDeleted int
declare @logDeleted int
print 'Log table has ' + cast(@countLogs as varchar(10)) + ' rows'
print 'Oldest log record is ' + cast(@weeksOld as varchar(10)) + ' weeks old'
declare @expiresAt datetime
set @expiresAt = DATEADD(WK, -1 * (@weeksOld - 1), @utcNow)
print 'Deleting log entries - Expiry date (UTC): ' + cast(@expiresAt as varchar(20))
print '-- Deleting records from CategoryLog'
DELETE dbo.CategoryLog
from dbo.CategoryLog
INNER JOIN dbo.Log
ON Log.LogId = CategoryLog.LogId
WHERE Log.Timestamp < @expiresAt
-- get the number of records deleted
set @categoryLogDeleted = @@ROWCOUNT
print '-- Deleting records from Scenario'
DELETE dbo.Scenario
from dbo.Scenario
INNER JOIN dbo.Log
ON Log.InstanceId = Scenario.InstanceId
WHERE Log.Timestamp < @expiresAt
-- get the number of records deleted
set @scenarioDeleted = @@ROWCOUNT
print '-- Deleting records from Log'
DELETE dbo.Log
from dbo.Log
WHERE Log.Timestamp < @expiresAt
-- get the number of records deleted
set @logDeleted = @@ROWCOUNT
print '*** [Summary] ***'
print '*** Deleted ' + cast(@logDeleted as varchar(10)) + ' rows from the Log table'
print '*** Deleted ' + cast(@categoryLogDeleted as varchar(10)) + ' rows from the CategoryLog table'
print '*** Deleted ' + cast(@scenarioDeleted as varchar(10)) + ' rows from the Scenario table'
end
else
begin
print '*** [Summary] ***'
print '--- No records have been deleted'
print '--- Log table has ' + cast(@countLogs as varchar(10)) + ' rows '
print '--- Oldest record is ' + cast(@weeksOld as varchar(10)) + ' weeks old'
end |
/* User is a keyword in sql, using customer instead */
-- CREATE TABLE Customer(
customer_id INTEGER PRIMARY KEY AUTO_INCREMENT,
email VARCHAR(100) NOT NULL UNIQUE,
/* 320 is usually used */
first_name VARCHAR(20) NOT NULL,
middle_name VARCHAR(20) NULL,
last_name VARCHAR(20) NOT NULL,
phone_number CHAR(10) DEFAULT '0000000000',
/* Default was added just for testing purposes, no need to keep inventing phone numbers */
pwd VARCHAR(100) NOT NULL
/* 255 is usually used */
);
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 */;
CREATE DATABASE IF NOT EXISTS `SE_Project` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `SE_Project`;
CREATE TABLE `Bookings` (
`book_id` int(11) NOT NULL,
`vendor_id` int(11) NOT NULL,
`customer_id` int(11) DEFAULT NULL,
`service_id` int(11) DEFAULT NULL,
`booking_status` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `Bookings` (`book_id`, `vendor_id`, `customer_id`, `service_id`, `booking_status`) VALUES
(60, 20, 2, 90, 'Pending'),
(61, 21, 1, 91, 'Accepted');
CREATE TABLE `Customer` (
`customer_id` int(11) NOT NULL,
`email` varchar(100) NOT NULL,
`first_name` varchar(20) NOT NULL,
`middle_name` varchar(20) DEFAULT NULL,
`last_name` varchar(20) NOT NULL,
`phone_number` char(10) DEFAULT '0000000000',
`pwd` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `Customer` (`customer_id`, `email`, `first_name`, `middle_name`, `last_name`, `phone_number`, `pwd`) VALUES
(1, '<EMAIL>', 'acb', 'ed', 'efg', '9658741230', 'acbedefg'),
(2, '<EMAIL>', '<PASSWORD>', NULL, 'uvw', '6758942536', 'uvwxyz');
CREATE TABLE `Events` (
`event_id` int(11) NOT NULL,
`event_name` varchar(100) NOT NULL,
`customer_id` int(11) DEFAULT NULL,
`budget` int(11) NOT NULL,
`num_people` int(11) DEFAULT NULL,
`date_event` date DEFAULT NULL,
`service_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `Events` (`event_id`, `event_name`, `customer_id`, `budget`, `num_people`, `date_event`, `service_id`) VALUES
(300, 'birthday', 1, 10000, 50, '2018-10-31', 90);
CREATE TABLE `Services` (
`service_id` int(11) NOT NULL,
`vendor_id` int(11) NOT NULL,
`service_name` varchar(100) NOT NULL,
`price_per_unit` decimal(10,0) NOT NULL,
`service_type` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `Services` (`service_id`, `vendor_id`, `service_name`, `price_per_unit`, `service_type`) VALUES
(90, 20, 'lunch food', '30', 'food'),
(91, 21, 'lights', '50', 'lights');
CREATE TABLE `Vendor` (
`vendor_id` int(11) NOT NULL,
`vendor_name` varchar(100) DEFAULT NULL,
`vendor_location` varchar(150) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `Vendor` (`vendor_id`, `vendor_name`, `vendor_location`) VALUES
(20, 'creepers', 'blore'),
(21, 'sleepers', 'MUMBAI');
ALTER TABLE `Bookings`
ADD PRIMARY KEY (`book_id`),
ADD KEY `vendor_id` (`vendor_id`),
ADD KEY `customer_id` (`customer_id`),
ADD KEY `service_id` (`service_id`);
ALTER TABLE `Customer`
ADD PRIMARY KEY (`customer_id`),
ADD UNIQUE KEY `email` (`email`);
ALTER TABLE `Events`
ADD PRIMARY KEY (`event_id`),
ADD KEY `customer_id` (`customer_id`),
ADD KEY `service_id` (`service_id`);
ALTER TABLE `Services`
ADD PRIMARY KEY (`service_id`,`vendor_id`),
ADD KEY `vendor_id` (`vendor_id`);
ALTER TABLE `Vendor`
ADD PRIMARY KEY (`vendor_id`);
ALTER TABLE `Bookings`
MODIFY `book_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=62;
ALTER TABLE `Customer`
MODIFY `customer_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
ALTER TABLE `Events`
MODIFY `event_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=301;
ALTER TABLE `Vendor`
MODIFY `vendor_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
ALTER TABLE `Bookings`
ADD CONSTRAINT `Bookings_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `Vendor` (`vendor_id`),
ADD CONSTRAINT `Bookings_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `Customer` (`customer_id`),
ADD CONSTRAINT `Bookings_ibfk_3` FOREIGN KEY (`service_id`) REFERENCES `Services` (`service_id`);
ALTER TABLE `Events`
ADD CONSTRAINT `Events_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `Customer` (`customer_id`),
ADD CONSTRAINT `Events_ibfk_2` FOREIGN KEY (`service_id`) REFERENCES `Services` (`service_id`);
ALTER TABLE `Services`
ADD CONSTRAINT `Services_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `Vendor` (`vendor_id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
<reponame>jlenon7/tads-projeto-final
INSERT INTO professor (id, area_conhecimento)
VALUES (1001, 1); |
create or replace function get_cards_in_archetype(input varchar)
returns setof cards
as $$
begin
return query
select c.* from cards c
inner join card_to_archetypes ca on ca.cardarchetypesid = c.archetypes
inner join archetypes a on a.id = ca.archetypesid
where a.name ~~* input
order by c.name asc;
end;
$$
language plpgsql; |
BEGIN;
\i Base.sql
COPY gl(id, transdate, approved) FROM stdin DELIMITER '|';
-1000|1900-01-01|TRUE
-1001|1900-01-03|TRUE
\.
COPY acc_trans(trans_id,chart_id,amount,transdate,approved,entry_id) FROM stdin DELIMITER '|';
-1000|-1000|100.00|1900-01-01|TRUE|-1000
-1001|-1000|100.00|1900-01-03|TRUE|-1001
\.
INSERT INTO test_result(test_name, success)
SELECT 'first transaction balance = 100 (with pre-posting start-date)',
running_balance = 100
FROM report__gl(NULL, -- reference
(select accno from account where id = -1000),
NULL, NULL, -- category, source
NULL, NULL, -- memo, description
'1899-12-31'::date, -- from_date
'1900-01-01'::date, -- to_date
NULL, -- approved
NULL, NULL, -- from_amount, to_amount
NULL -- business_units
);
INSERT INTO test_result(test_name, success)
SELECT 'first transaction balance = 100 (NULL start-date)',
running_balance = 100
FROM report__gl(NULL, -- reference
(select accno from account where id = -1000),
NULL, NULL, -- category, source
NULL, NULL, -- memo, description
NULL, -- from_date
'1900-01-01'::date, -- to_date
NULL, -- approved
NULL, NULL, -- from_amount, to_amount
NULL -- business_units
);
INSERT INTO test_result(test_name, success)
SELECT 'first transaction balance = 100 (start-date matches transdate)',
running_balance = 100
FROM report__gl(NULL, -- reference
(select accno from account where id = -1000),
NULL, NULL, -- category, source
NULL, NULL, -- memo, description
'1900-01-01'::date, -- from_date
'1900-01-02'::date, -- to_date
NULL, -- approved
NULL, NULL, -- from_amount, to_amount
NULL -- business_units
);
INSERT INTO test_result(test_name, success)
SELECT 'end-dates-match balance = 200',
running_balance = 200
FROM report__gl(NULL, -- reference
(select accno from account where id = -1000),
NULL, NULL, -- category, source
NULL, NULL, -- memo, description
'1900-01-02'::date, -- from_date
'1900-01-03'::date, -- to_date
NULL, -- approved
NULL, NULL, -- from_amount, to_amount
NULL -- business_units
);
SELECT * FROM test_result;
SELECT (select count(*) from test_result where success is true)
|| ' tests passed and '
|| (select count(*) from test_result where success is not true)
|| ' failed' as message;
ROLLBACK;
|
INSERT INTO Probe(probeId, probeName, password, salt, token) VALUES(30010,"design-time","n/a","n/a","n/a");
|
DROP TABLE IF EXISTS `vip_config`;</explode>
CREATE TABLE `vip_config` (
`k` varchar(255) NOT NULL,
`v` text,
PRIMARY KEY (`k`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;</explode>
INSERT INTO `vip_config` VALUES ('admin_user', 'admin');</explode>
INSERT INTO `vip_config` VALUES ('admin_pwd', '<PASSWORD>');</explode>
INSERT INTO `vip_config` VALUES ('title', 'VIP电影在线播放');</explode>
INSERT INTO `vip_config` VALUES ('keywords', 'VIP,电影,在线,播放');</explode>
INSERT INTO `vip_config` VALUES ('description', 'VIP电影在线播放');</explode>
INSERT INTO `vip_config` VALUES ('jk', '<option value ="http://jx.71ki.com/index.php?url=">通用vip接口①</option>');</explode>
INSERT INTO `vip_config` VALUES ('gg', '网站底部必须保留链接,1080kan链接');</explode>
INSERT INTO `vip_config` VALUES ('cd', '<nav class="navbar navbar-fixed-top navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">VIP电影在线播放</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-nav">
<!--<li><a href="/"><span class="glyphicon glyphicon-list"></span> 菜单</a></li>-->
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="about.php"><span class="glyphicon glyphicon-envelope"></span> 留言</a></li>
</div>
</div>
</nav>');</explode>
INSERT INTO `vip_config` VALUES ('tj', '此统计代码是放在head标签里的');</explode> |
<gh_stars>0
CREATE DATABASE `myauthorization` DEFAULT CHARACTER SET utf8;
USE `myauthorization`;
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(32) DEFAULT NULL COMMENT '姓名',
`address` varchar(64) DEFAULT NULL COMMENT '联系地址',
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '账号',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '密码',
`roles` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '角色',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `user`
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('1', 'Adam', 'beijing', 'adam','$2a$10$9SIFu8l8asZUKxtwqrJM5ujhWarz/PMnTX44wXNsBHfpJMakWw3M6', 'ROLE_USER');
INSERT INTO `user` VALUES ('2', 'SuperMan', 'shanghang', 'super','$2a$10$9SIFu8l8asZUKxtwqrJM5ujhWarz/PMnTX44wXNsBHfpJMakWw3M6', 'ROLE_USER,ROLE_ADMIN');
INSERT INTO `user` VALUES ('3', 'Manager', 'beijing', 'manager','$2a$10$9SIFu8l8asZUKxtwqrJM5ujhWarz/PMnTX44wXNsBHfpJMakWw3M6', 'ROLE_USER,ROLE_MANAGER');
INSERT INTO `user` VALUES ('4', 'User1', 'shanghang', 'user1','$2a$10$9SIFu8l8asZUKxtwqrJM5ujhWarz/PMnTX44wXNsBHfpJMakWw3M6', 'ROLE_USER,ROLE_DEPART1');
INSERT INTO `user` VALUES ('5', 'User2', 'shanghang', 'user2','$2a$10$9SIFu8l8asZUKxtwqrJM5ujhWarz/PMnTX44wXNsBHfpJMakWw3M6', 'ROLE_USER,ROLE_DEPART2');
COMMIT;
-- ----------------------------
-- Table structure for `resource`
-- ----------------------------
DROP TABLE IF EXISTS `resource`;
CREATE TABLE `resource` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`url` varchar(255) DEFAULT NULL COMMENT '资源',
`roles` varchar(255) DEFAULT NULL COMMENT '所需角色',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `resource`
-- ----------------------------
BEGIN;
INSERT INTO `resource` VALUES ('1', '/depart1/**', 'ROLE_ADMIN,ROLE_MANAGER,ROLE_DEPART1');
INSERT INTO `resource` VALUES ('2', '/depart2/**', 'ROLE_ADMIN,ROLE_MANAGER,ROLE_DEPART2');
INSERT INTO `resource` VALUES ('3', '/user/**', 'ROLE_ADMIN,ROLE_USER');
INSERT INTO `resource` VALUES ('4', '/admin/**', 'ROLE_ADMIN');
COMMIT;
|
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table users (
id integer not null,
first_name varchar(255),
last_name varchar(255),
password varchar(255),
constraint pk_users primary key (id))
;
create sequence users_seq;
# --- !Downs
SET REFERENTIAL_INTEGRITY FALSE;
drop table if exists users;
SET REFERENTIAL_INTEGRITY TRUE;
drop sequence if exists users_seq;
|
USE msl;
// Q1:
TRUNCATE users;
COPY users FROM '../data/Q01_users.csv';
// Q2:
TRUNCATE user_ratings;
COPY user_ratings FROM '../data/Q02_user_data.csv';
// Q3:
TRUNCATE average_ratings;
SOURCE '../data/Q03_average_ratings.csv';
// Q4:
TRUNCATE featured_songs;
COPY featured_songs (hotness_bucket, content_type, hotness_value, song_id, album_id, album_name, album_year, artist_id, artist_mbid, artist_name, song_duration, song_name, image_link) FROM '../data/Q04_featured_songs.csv';
// Q5:
TRUNCATE songs_by_facet;
COPY songs_by_facet (facet_name, content_type, song_name, song_id, album_id, album_name, album_year, artist_id, artist_mbid, artist_name, song_duration, image_link) FROM '../data/Q05_songs_by_facet.csv';
// Q6:
TRUNCATE featured_albums;
COPY featured_albums FROM '../data/Q06_featured_albums.csv';
// Q7:
TRUNCATE albums_by_facet;
COPY albums_by_facet FROM '../data/Q07_albums_by_facet.csv';
// Q8:
TRUNCATE featured_artists;
COPY featured_artists FROM '../data/Q08_featured_artists.csv';
// Q9:
TRUNCATE artists_by_facet;
COPY artists_by_facet FROM '../data/Q09_artists_by_facet.csv';
// Q10:
TRUNCATE songs_albums_by_artist;
COPY songs_albums_by_artist (artist_id, album_year, album_name, album_id, song_name, song_id, artist_genres, artist_mbid, artist_name, similar_artists, song_duration, image_link) FROM '../data/Q10_songs_albums_by_artist.csv';
// Q11:
TRUNCATE songs_by_user;
COPY songs_by_user (user_id, content_type, favorites_timestamp, song_id, album_id, album_name, album_year, artist_id, artist_mbid, artist_name, song_duration, song_name, image_link) FROM '../data/Q11_songs_by_user.csv';
// Q12:
TRUNCATE albums_by_user;
COPY albums_by_user FROM '../data/Q12_albums_by_user.csv';
// Q13:
TRUNCATE artists_by_user;
COPY artists_by_user FROM '../data/Q13_artists_by_user.csv';
// Q14:
TRUNCATE songs_artist_by_album;
COPY songs_artist_by_album FROM '../data/Q14_songs_artist_by_album.csv';
// Q15:
TRUNCATE album_artist_by_song;
COPY album_artist_by_song (song_id, album_id, album_name, album_year, artist_genres, artist_id, artist_mbid, artist_name, similar_artists, song_duration, song_name, image_link) FROM '../data/Q15_album_artist_by_song.csv';
|
CREATE INDEX "COLL_OBJ_CONT_HIST" ON "COLL_OBJ_CONT_HIST" ("COLLECTION_OBJECT_ID")
|
<gh_stars>1-10
CREATE TABLE DIGITAL_IDENTITY
(
DIGITAL_IDENTITY_ID RAW(16) NOT NULL,
STUDENT_ID RAW(16),
IDENTITY_TYPE_CODE VARCHAR2(10) NOT NULL,
IDENTITY_VALUE VARCHAR2(255) NOT NULL,
LAST_ACCESS_DATE DATE NOT NULL,
LAST_ACCESS_CHANNEL_CODE VARCHAR2(10) NOT NULL,
CREATE_USER VARCHAR2(32) NOT NULL,
CREATE_DATE DATE DEFAULT SYSDATE NOT NULL,
UPDATE_USER VARCHAR2(32) NOT NULL,
UPDATE_DATE DATE DEFAULT SYSDATE NOT NULL,
CONSTRAINT DIGITAL_IDENTITY_PK PRIMARY KEY (DIGITAL_IDENTITY_ID)
);
CREATE TABLE ACCESS_CHANNEL_CODE
(
ACCESS_CHANNEL_CODE VARCHAR2(10) NOT NULL,
LABEL VARCHAR2(30),
DESCRIPTION VARCHAR2(255),
DISPLAY_ORDER NUMBER DEFAULT 1 NOT NULL,
EFFECTIVE_DATE DATE NOT NULL,
EXPIRY_DATE DATE NOT NULL,
CREATE_USER VARCHAR2(32) NOT NULL,
CREATE_DATE DATE DEFAULT SYSDATE NOT NULL,
UPDATE_USER VARCHAR2(32) NOT NULL,
UPDATE_DATE DATE DEFAULT SYSDATE NOT NULL,
CONSTRAINT ACCESS_CHANNEL_CODE_PK PRIMARY KEY (ACCESS_CHANNEL_CODE)
);
CREATE TABLE IDENTITY_TYPE_CODE
(
IDENTITY_TYPE_CODE VARCHAR2(10) NOT NULL,
LABEL VARCHAR2(30),
DESCRIPTION VARCHAR2(255),
DISPLAY_ORDER NUMBER DEFAULT 1 NOT NULL,
EFFECTIVE_DATE DATE NOT NULL,
EXPIRY_DATE DATE NOT NULL,
CREATE_USER VARCHAR2(32) NOT NULL,
CREATE_DATE DATE DEFAULT SYSDATE NOT NULL,
UPDATE_USER VARCHAR2(32) NOT NULL,
UPDATE_DATE DATE DEFAULT SYSDATE NOT NULL,
CONSTRAINT IDENTITY_TYPE_CODE_PK PRIMARY KEY (IDENTITY_TYPE_CODE)
);
--Comments on tables--
COMMENT ON TABLE ACCESS_CHANNEL_CODE IS 'Access Channel Code lists the various channels (applications or services) that make use of the student Digital Identity records to access Education Services. Examples are the Online Student PEN Retrieval and the Student Transcript Service.';
COMMENT ON TABLE IDENTITY_TYPE_CODE IS 'Identity Type Code lists the types of digital identities supported. Examples are BC Services Card and Basic BCeID.';
COMMENT ON TABLE DIGITAL_IDENTITY IS 'A Digital Identity is used by a specific student to access Education services. Types of digital identities supported include BC Services Card and Basic BCeID.';
--Alter tables--
ALTER TABLE DIGITAL_IDENTITY
ADD CONSTRAINT UQ_DIGITAL_ID_USER_VAL_TYPE UNIQUE (IDENTITY_TYPE_CODE, IDENTITY_VALUE);
ALTER TABLE DIGITAL_IDENTITY
ADD CONSTRAINT FK_DIGITAL_IDENT_IDENT_TYPE_CODE FOREIGN KEY (IDENTITY_TYPE_CODE) REFERENCES IDENTITY_TYPE_CODE (IDENTITY_TYPE_CODE);
ALTER TABLE DIGITAL_IDENTITY
ADD CONSTRAINT FK_DIGITAL_IDENT_ACCESS_CHAN_CODE FOREIGN KEY (LAST_ACCESS_CHANNEL_CODE) REFERENCES ACCESS_CHANNEL_CODE (ACCESS_CHANNEL_CODE);
--Inserts for code tables--
INSERT INTO ACCESS_CHANNEL_CODE (ACCESS_CHANNEL_CODE, LABEL, DESCRIPTION, DISPLAY_ORDER, EFFECTIVE_DATE, EXPIRY_DATE,
CREATE_USER, CREATE_DATE, UPDATE_USER, UPDATE_DATE)
VALUES ('OSPR', 'Online Student PEN Retrieval',
'The Online Student PEN Retrieval (OSPR) application used by Students to get their PEN value. EDUC staff use the app to fulfill retrieval reqeusts.',
1, to_date('2020-01-01', 'YYYY-MM-DD'), to_date('2099-12-31', 'YYYY-MM-DD'), 'IDIR/GRCHWELO',
to_date('2019-11-07', 'YYYY-MM-DD'), 'IDIR/GRCHWELO', to_date('2019-11-07', 'YYYY-MM-DD'));
INSERT INTO ACCESS_CHANNEL_CODE (ACCESS_CHANNEL_CODE, LABEL, DESCRIPTION, DISPLAY_ORDER, EFFECTIVE_DATE, EXPIRY_DATE,
CREATE_USER, CREATE_DATE, UPDATE_USER, UPDATE_DATE)
VALUES ('STS', 'Student Transcripts Service',
'The Student Transcript Service that is used by Students to either get a copy of their high-school transcript or to send copies to schools, employers, etc.',
2, to_date('2020-01-01', 'YYYY-MM-DD'), to_date('2099-12-31', 'YYYY-MM-DD'), 'IDIR/GRCHWELO',
to_date('2019-11-07', 'YYYY-MM-DD'), 'IDIR/GRCHWELO', to_date('2019-11-07', 'YYYY-MM-DD'));
INSERT INTO IDENTITY_TYPE_CODE (IDENTITY_TYPE_CODE, LABEL, DESCRIPTION, DISPLAY_ORDER, EFFECTIVE_DATE, EXPIRY_DATE,
CREATE_USER, CREATE_DATE, UPDATE_USER, UPDATE_DATE)
VALUES ('BCSC', 'BC Services Card', 'Digital Identity via a BC Services Card, serviced by CITZ/IDIM.', 1,
to_date('2020-01-01', 'YYYY-MM-DD'), to_date('2099-12-31', 'YYYY-MM-DD'), 'IDIR/GRCHWELO',
to_date('2019-11-07', 'YYYY-MM-DD'), 'IDIR/GRCHWELO', to_date('2019-11-07', 'YYYY-MM-DD'));
INSERT INTO IDENTITY_TYPE_CODE (IDENTITY_TYPE_CODE, LABEL, DESCRIPTION, DISPLAY_ORDER, EFFECTIVE_DATE, EXPIRY_DATE,
CREATE_USER, CREATE_DATE, UPDATE_USER, UPDATE_DATE)
VALUES ('BASIC', 'Basic BCeID', 'Digital Identity via a Basic BCeID, serviced by CITZ/IDIM.', 2,
to_date('2020-01-01', 'YYYY-MM-DD'), to_date('2099-12-31', 'YYYY-MM-DD'), 'IDIR/GRCHWELO',
to_date('2019-11-07', 'YYYY-MM-DD'), 'IDIR/GRCHWELO', to_date('2019-11-07', 'YYYY-MM-DD'));
INSERT INTO IDENTITY_TYPE_CODE (IDENTITY_TYPE_CODE, LABEL, DESCRIPTION, DISPLAY_ORDER, EFFECTIVE_DATE, EXPIRY_DATE,
CREATE_USER, CREATE_DATE, UPDATE_USER, UPDATE_DATE)
VALUES ('PERSONAL', 'Personal BCeID', 'Digital Identity via a Personal BCeID, serviced by CITZ/IDIM.', 3,
to_date('2020-01-01', 'YYYY-MM-DD'), to_date('2099-12-31', 'YYYY-MM-DD'), 'IDIR/GRCHWELO',
to_date('2019-11-07', 'YYYY-MM-DD'), 'IDIR/GRCHWELO', to_date('2019-11-07', 'YYYY-MM-DD'));
CREATE INDEX DIGITAL_IDENTITY_IDENTITY_VALUE_I ON DIGITAL_IDENTITY ( IDENTITY_VALUE );
ALTER TABLE API_DIGITAL_ID.DIGITAL_IDENTITY RENAME CONSTRAINT FK_DIGITAL_IDENT_ACCESS_CHAN_CODE TO DIGITAL_IDENT_ACCESS_CHAN_CODE_FK;
ALTER TABLE API_DIGITAL_ID.DIGITAL_IDENTITY RENAME CONSTRAINT FK_DIGITAL_IDENT_IDENT_TYPE_CODE TO DIGITAL_IDENT_IDENT_TYPE_CODE_FK;
ALTER INDEX API_DIGITAL_ID.DIGITAL_IDENTITY_IDENTITY_VALUE_I
RENAME TO DIGITAL_IDENTITY_IDENTITY_VALUE_IDX;
ALTER INDEX API_DIGITAL_ID.DIGITAL_IDENTITY_IDENTITY_VALUE_IDX REBUILD LOGGING NOREVERSE TABLESPACE API_DIGITAL_ID_IDX NOCOMPRESS;
ALTER INDEX API_DIGITAL_ID.ACCESS_CHANNEL_CODE_PK REBUILD LOGGING NOREVERSE TABLESPACE API_DIGITAL_ID_IDX NOCOMPRESS;
ALTER INDEX API_DIGITAL_ID.DIGITAL_IDENTITY_PK REBUILD LOGGING NOREVERSE TABLESPACE API_DIGITAL_ID_IDX NOCOMPRESS;
ALTER INDEX API_DIGITAL_ID.IDENTITY_TYPE_CODE_PK REBUILD LOGGING NOREVERSE TABLESPACE API_DIGITAL_ID_IDX NOCOMPRESS;
ALTER INDEX API_DIGITAL_ID.UQ_DIGITAL_ID_USER_VAL_TYPE REBUILD NOLOGGING NOREVERSE TABLESPACE API_DIGITAL_ID_IDX NOCOMPRESS;
ALTER TABLE API_DIGITAL_ID.DIGITAL_IDENTITY RENAME CONSTRAINT UQ_DIGITAL_ID_USER_VAL_TYPE TO DIGITAL_ID_USER_VAL_TYPE_UK;
ALTER INDEX API_DIGITAL_ID.UQ_DIGITAL_ID_USER_VAL_TYPE RENAME TO DIGITAL_ID_USER_VAL_TYPE_UK;
|
shutdown abort;
exit
|
select 'drop database '||quote_ident(datname)||';' as query
from pg_database
where datistemplate=false AND datname!='postgres';
|
<gh_stars>1-10
{% macro get_campaign_columns() %}
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()},
{"name": "active", "datatype": "boolean"},
{"name": "created_at", "datatype": dbt_utils.type_timestamp()},
{"name": "description", "datatype": dbt_utils.type_string()},
{"name": "id", "datatype": dbt_utils.type_int()},
{"name": "name", "datatype": dbt_utils.type_string()},
{"name": "program_id", "datatype": dbt_utils.type_int()},
{"name": "program_name", "datatype": dbt_utils.type_string()},
{"name": "type", "datatype": dbt_utils.type_string()},
{"name": "updated_at", "datatype": dbt_utils.type_timestamp()},
{"name": "workspace_name", "datatype": dbt_utils.type_string()}
] %}
{{ return(columns) }}
{% endmacro %}
|
CREATE TABLE BelongTo (
BelongID INTEGER NOT NULL,
StartDate DATE,
EndDate DATE,
DepartmentID INTEGER,
EmployeeID INTEGER
);
ALTER TABLE BelongTo
ADD PRIMARY KEY (BelongID);
CREATE TABLE Categories (
CategoryID INTEGER NOT NULL,
CategoryName VARCHAR(100)
);
ALTER TABLE Categories
ADD PRIMARY KEY (CategoryID);
CREATE TABLE CustomerClasses (
CustomerClassID INTEGER NOT NULL,
CustomerClassName VARCHAR(100)
);
ALTER TABLE CustomerClasses
ADD PRIMARY KEY (CustomerClassID);
CREATE TABLE Customers (
CustomerID INTEGER NOT NULL,
CustomerCode INTEGER,
CustomerName VARCHAR(100),
Address VARCHAR(100),
CustomerClassID INTEGER,
PrefecturalID INTEGER
);
ALTER TABLE Customers
ADD PRIMARY KEY (CustomerID);
CREATE TABLE Departments (
DepartmentID INTEGER NOT NULL,
DepartmentName VARCHAR(100)
);
ALTER TABLE Departments
ADD PRIMARY KEY (DepartmentID);
CREATE TABLE Employees (
EmployeeID INTEGER NOT NULL,
EmployeeName VARCHAR(100),
Height NUMERIC,
EMail VARCHAR(100),
Weight NUMERIC,
HireFiscalYear INTEGER,
Birthday DATE,
BloodType VARCHAR(2)
);
ALTER TABLE Employees
ADD PRIMARY KEY (EmployeeID);
CREATE TABLE Prefecturals (
PrefecturalID INTEGER NOT NULL,
PrefecturalName VARCHAR(100)
);
ALTER TABLE Prefecturals
ADD PRIMARY KEY (PrefecturalID);
CREATE TABLE Products (
ProductID INTEGER NOT NULL,
ProductCode INTEGER,
ProductName VARCHAR(100),
Price NUMERIC,
CategoryID INTEGER
);
ALTER TABLE Products
ADD PRIMARY KEY (ProductID);
CREATE TABLE Salary (
SalaryID INTEGER NOT NULL,
PayDate DATE,
Amount NUMERIC,
EmployeeID INTEGER
);
ALTER TABLE Salary
ADD PRIMARY KEY (SalaryID);
CREATE TABLE Sales (
SaleID INTEGER NOT NULL,
Quantity NUMERIC,
CustomerID INTEGER,
ProductID INTEGER,
EmployeeID INTEGER,
SaleDate DATE
);
ALTER TABLE Sales
ADD PRIMARY KEY (SaleID);
|
SELECT * FROM users;
|
CREATE TABLE IF NOT EXISTS "Record" (
"id" UUID NOT NULL,
"typeId" UUID NOT NULL,
"data" LONGVARBINARY NOT NULL,
PRIMARY KEY ("typeId", "id")
);
CREATE INDEX IF NOT EXISTS "k_Record_id" ON "Record" ("id");
CREATE TRIGGER IF NOT EXISTS "t_Record_searchUpdate" BEFORE INSERT, UPDATE, DELETE ON "Record" FOR EACH ROW CALL "com.psddev.dari.h2.SearchUpdateTrigger";
CREATE TABLE IF NOT EXISTS "RecordSearch" (
"id" UUID NOT NULL,
"fieldName" VARCHAR(100) NOT NULL,
"value" LONGVARCHAR NOT NULL,
PRIMARY KEY ("id", "fieldName")
);
CREATE ALIAS IF NOT EXISTS FT_INIT FOR "org.h2.fulltext.FullText.init";
CALL FT_INIT();
CALL FT_CREATE_INDEX('PUBLIC', 'RecordSearch', 'value');
CREATE TABLE IF NOT EXISTS "RecordLocation3" (
"id" UUID NOT NULL,
"typeId" UUID NOT NULL,
"symbolId" INT NOT NULL,
"value" GEOMETRY NOT NULL,
PRIMARY KEY ("symbolId", "value", "typeId", "id")
);
CREATE INDEX IF NOT EXISTS "k_RecordLocation3_id" ON "RecordLocation3" ("id");
CREATE SPATIAL INDEX IF NOT EXISTS "k_RecordLocation3_value" ON "RecordLocation3" ("value");
CREATE TABLE IF NOT EXISTS "RecordNumber3" (
"id" UUID NOT NULL,
"typeId" UUID NOT NULL,
"symbolId" INT NOT NULL,
"value" DOUBLE NOT NULL,
PRIMARY KEY ("symbolId", "value", "typeId", "id")
);
CREATE INDEX IF NOT EXISTS "k_RecordNumber3_id" ON "RecordNumber3" ("id");
CREATE TABLE IF NOT EXISTS "RecordRegion2" (
"id" UUID NOT NULL,
"typeId" UUID NOT NULL,
"symbolId" INT NOT NULL,
"value" GEOMETRY NOT NULL,
PRIMARY KEY ("symbolId", "value", "typeId", "id")
);
CREATE INDEX IF NOT EXISTS "k_RecordRegion2_id" ON "RecordRegion2" ("id");
CREATE SPATIAL INDEX IF NOT EXISTS "k_RecordRegion2_value" ON "RecordRegion2" ("value");
CREATE TABLE IF NOT EXISTS "RecordString4" (
"id" UUID NOT NULL,
"typeId" UUID NOT NULL,
"symbolId" INT NOT NULL,
"value" VARCHAR(500) NOT NULL,
PRIMARY KEY ("symbolId", "value", "typeId", "id")
);
CREATE INDEX IF NOT EXISTS "k_RecordString4_id" ON "RecordString4" ("id");
CREATE TABLE IF NOT EXISTS "RecordUpdate" (
"id" UUID NOT NULL,
"typeId" UUID NOT NULL,
"updateDate" DOUBLE NOT NULL,
PRIMARY KEY ("id")
);
CREATE INDEX IF NOT EXISTS "k_RecordUpdate_typeId_updateDate" ON "RecordUpdate" ("typeId", "updateDate");
CREATE INDEX IF NOT EXISTS "k_RecordUpdate_updateDate" ON "RecordUpdate" ("updateDate");
CREATE TABLE IF NOT EXISTS "RecordUuid3" (
"id" UUID NOT NULL,
"typeId" UUID NOT NULL,
"symbolId" INT NOT NULL,
"value" UUID NOT NULL,
PRIMARY KEY ("symbolId", "value", "typeId", "id")
);
CREATE INDEX IF NOT EXISTS "k_RecordUuid3_id" ON "RecordUuid3" ("id");
CREATE TABLE IF NOT EXISTS "Symbol" (
"symbolId" INT NOT NULL AUTO_INCREMENT,
"value" VARCHAR(500) NOT NULL,
PRIMARY KEY ("symbolId")
);
CREATE UNIQUE INDEX IF NOT EXISTS "k_Symbol_value" ON "Symbol" ("value");
|
DROP TABLE IF EXISTS titles CASCADE;
CREATE TABLE titles (
tconst varchar primary key,
titleType varchar(20),
primaryTitle text,
originalTitle text,
isAdult smallint,
startYear smallint,
endYear smallint,
runtimeMinutes integer,
genres varchar
);
ALTER TABLE titles ADD COLUMN title_search_col tsvector;
UPDATE titles SET title_search_col =
to_tsvector('english', coalesce(primaryTitle,'') || ' ' || coalesce(originalTitle,''));
CREATE INDEX title_idx ON titles USING GIN (title_search_col);
UPDATE titles SET title_search_col =
setweight(to_tsvector(coalesce(primaryTitle,'')), 'A') ||
setweight(to_tsvector(coalesce(originalTitle,'')), 'C');
CREATE FUNCTION titles_trigger() RETURNS trigger AS $$
begin
new.title_search_col :=
setweight(to_tsvector('pg_catalog.english', coalesce(new.primaryTitle,'')), 'A') ||
setweight(to_tsvector('pg_catalog.english', coalesce(new.originalTitle,'')), 'C');
return new;
end
$$ LANGUAGE plpgsql;
CREATE TRIGGER ts_vector_titles_trigger BEFORE INSERT OR UPDATE
ON titles FOR EACH ROW EXECUTE PROCEDURE titles_trigger();
DROP TABLE IF EXISTS akas CASCADE;
CREATE TABLE akas (
titleId char(9),
ordering smallint,
title text,
region varchar(10),
language varchar(10),
types varchar(20)[],
attributes text[],
isOriginalTitle smallint
);
DROP TABLE IF EXISTS episodes CASCADE;
CREATE TABLE episodes (
tconst char(9) unique,
parentTconst char(9),
seasonNumber integer,
episodeNumber integer
);
DROP TABLE IF EXISTS ratings CASCADE;
CREATE TABLE ratings (
tconst char(9) unique,
averageRating double precision,
numVotes integer
);
DROP TABLE IF EXISTS people CASCADE;
CREATE TABLE people (
nconst varchar(10) primary key,
primaryName text,
birthYear smallint,
deathYear smallint,
primaryProfession varchar(50)[],
knownForTitles char(9)[]
);
ALTER TABLE people ADD COLUMN people_search_col tsvector;
UPDATE people SET people_search_col =
to_tsvector('english', coalesce(primaryName,''));
CREATE INDEX people_idx ON people USING GIN (people_search_col);
CREATE TRIGGER ts_vector_people_update BEFORE INSERT OR UPDATE
ON people FOR EACH ROW EXECUTE PROCEDURE
tsvector_update_trigger(people_search_col, 'pg_catalog.english', primaryName);
DROP TABLE IF EXISTS principals CASCADE;
CREATE TABLE principals (
tconst char(9),
ordering integer,
nconst varchar(10),
category varchar(20),
job text,
character text
);
DROP TABLE IF EXISTS crew CASCADE;
CREATE TABLE crew (
tconst char(9) unique,
directors varchar(10)[],
writers varchar(10)[]
);
|
<reponame>josh-greenlaw/ads-dba<filename>DashboardQueries/backups_detail.sql<gh_stars>0
USE msdb;
DECLARE @now DATETIME = GETDATE();
WITH mostRecentBackups
AS (
SELECT db.name AS DatabaseName,
(
SELECT DATEDIFF(MINUTE, MAX(bs.backup_finish_date), @now)
FROM dbo.backupset bs
WHERE bs.[type] = 'L'
AND bs.database_name = db.name
) AS LastLogBackup,
(
SELECT DATEDIFF(MINUTE, MAX(bs.backup_finish_date), @now)
FROM dbo.backupset bs
WHERE bs.[type] = 'D'
AND bs.database_name = db.name
) AS LastFullBackup,
db.recovery_model_desc AS RecoveryModel
FROM sys.databases db
WHERE Cast(CASE WHEN name IN ('master', 'model', 'msdb', 'tempdb') THEN 1 ELSE is_distributor END As bit) = 0) -- Exclude system databases
SELECT mostRecentBackups.DatabaseName,
mostRecentBackups.LastFullBackup,
mostRecentBackups.LastLogBackup,
CASE
WHEN mostRecentBackups.LastFullBackup > 1440
THEN 'Unhealthy'
WHEN mostRecentBackups.LastLogBackup > 15 AND RecoveryModel = 'FULL'
THEN 'Unhealthy'
WHEN mostRecentBackups.LastFullBackup IS NULL
THEN 'Unhealthy'
WHEN mostRecentBackups.LastLogBackup IS NULL AND RecoveryModel = 'FULL'
THEN 'Unhealthy'
ELSE 'Healthy' END AS Health
FROM mostRecentBackups
ORDER BY Health, DatabaseName |
CREATE TABLE IF NOT EXISTS genres (
name text NOT NULL,
genre_id uuid DEFAULT gen_random_uuid(),
CONSTRAINT genres_pk
PRIMARY KEY (genre_id)
); |
INSERT INTO Toppings(ToppingID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 0.75, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'chicken' AND S.Name = 'CPK'
INSERT INTO Toppings(ToppingID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 0.66, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'beef' AND S.Name = 'CPK'
INSERT INTO Toppings(ToppingID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 0.50, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'ham' AND S.Name = 'CPK'
INSERT INTO Toppings(ToppingID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 0.40, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'mushroom' AND S.Name = 'CPK'
INSERT INTO Toppings(ToppingID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 0.25, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'olive' AND S.Name = 'CPK'
INSERT INTO Toppings(ToppingID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 0.30, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'peppers' AND S.Name = 'CPK'
INSERT INTO Toppings(ToppingID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 0.70, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'pepperoni' AND S.Name = 'CPK'
INSERT INTO Toppings(ToppingID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 0.80, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'pineapple' AND S.Name = 'CPK'
INSERT INTO Toppings(ToppingID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 0.75, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'salami' AND S.Name = 'CPK'
INSERT INTO Toppings(ToppingID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 0.75, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'sausage' AND S.Name = 'CPK'
INSERT INTO Crusts(CrustID, PizzaTypeCompID, StoreID, Price, Inventory, CheeseStuffed, StuffedPrice)
SELECT newid(), c.CompID, s.StoreID, 1.00, 100, 0, 1.50
FROM Comps as C, Stores as S
WHERE C.Name = 'regular' AND S.Name = 'CPK'
INSERT INTO Crusts(CrustID, PizzaTypeCompID, StoreID, Price, Inventory, CheeseStuffed, StuffedPrice)
SELECT newid(), c.CompID, s.StoreID, 1.50, 100, 0, 1.50
FROM Comps as C, Stores as S
WHERE C.Name = 'hand-tossed' AND S.Name = 'CPK'
INSERT INTO Crusts(CrustID, PizzaTypeCompID, StoreID, Price, Inventory, CheeseStuffed, StuffedPrice)
SELECT newid(), c.CompID, s.StoreID, 1.00, 100, 0, 1.50
FROM Comps as C, Stores as S
WHERE C.Name = 'thin' AND S.Name = 'CPK'
INSERT INTO Sizes(SizeID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 3.00, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'small' AND S.Name = 'CPK'
INSERT INTO Sizes(SizeID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 4.00, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'medium' AND S.Name = 'CPK'
INSERT INTO Sizes(SizeID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 5.00, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'large' AND S.Name = 'CPK'
INSERT INTO Sizes(SizeID, PizzaTypeCompID, StoreID, Price, Inventory)
SELECT newid(), c.CompID, s.StoreID, 6.00, 100
FROM Comps as C, Stores as S
WHERE C.Name = 'extra large' AND S.Name = 'CPK'
INSERT INTO BasicPizza(PresetID, Type, CrustID, AStoreStoreID, PizzaPrice)
SELECT newid(), 'Meat Pizza', crust.CrustID, s.StoreID, 0
FROM Stores as s, Crusts as crust
WHERE s.Name = 'CPK' AND Crust.PizzaTypeCompID = (SELECT Comps.CompID FROM Comps WHERE Comps.Name = 'regular') AND Crust.StoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK')
INSERT INTO BasicPizza(PresetID, Type, CrustID, AStoreStoreID, PizzaPrice)
SELECT newid(), 'Hawaiian Pizza', crust.CrustID, s.StoreID, 0
FROM Stores as s, Crusts as crust
WHERE s.Name = 'CPK' AND Crust.PizzaTypeCompID = (SELECT Comps.CompID FROM Comps WHERE Comps.Name = 'regular') AND Crust.StoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK')
INSERT INTO PresetPizza(BasicPizzaID, ToppingID)
SELECT p.PresetID, t.ToppingID
FROM BasicPizza as p, Toppings as t
WHERE p.Type = 'Meat Pizza' AND T.PizzaTypeCompID = (SELECT Comps.CompID FROM Comps WHERE Comps.Name = 'beef') AND T.StoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK') AND p.AStoreStoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK')
INSERT INTO PresetPizza(BasicPizzaID, ToppingID)
SELECT p.PresetID, t.ToppingID
FROM BasicPizza as p, Toppings as t
WHERE p.Type = 'Meat Pizza' AND T.PizzaTypeCompID = (SELECT Comps.CompID FROM Comps WHERE Comps.Name ='chicken') AND T.StoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK') AND p.AStoreStoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK')
INSERT INTO PresetPizza(BasicPizzaID, ToppingID)
SELECT p.PresetID, t.ToppingID
FROM BasicPizza as p, Toppings as t
WHERE p.Type = 'Meat Pizza' AND T.PizzaTypeCompID = (SELECT Comps.CompID FROM Comps WHERE Comps.Name = 'ham') AND T.StoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK') AND p.AStoreStoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK')
INSERT INTO PresetPizza(BasicPizzaID, ToppingID)
SELECT p.PresetID, t.ToppingID
FROM BasicPizza as p, Toppings as t
WHERE p.Type = 'Meat Pizza' AND T.PizzaTypeCompID = (SELECT Comps.CompID FROM Comps WHERE Comps.Name = 'salami') AND T.StoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK') AND p.AStoreStoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK')
INSERT INTO PresetPizza(BasicPizzaID, ToppingID)
SELECT p.PresetID, t.ToppingID
FROM BasicPizza as p, Toppings as t
WHERE p.Type = 'Meat Pizza' AND T.PizzaTypeCompID = (SELECT Comps.CompID FROM Comps WHERE Comps.Name = 'pepperoni') AND T.StoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK') AND p.AStoreStoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK')
INSERT INTO PresetPizza(BasicPizzaID, ToppingID)
SELECT p.PresetID, t.ToppingID
FROM BasicPizza as p, Toppings as t
WHERE p.Type = 'Hawaiian Pizza' AND T.PizzaTypeCompID = (SELECT Comps.CompID FROM Comps WHERE Comps.Name = 'ham') AND T.StoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK') AND p.AStoreStoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK')
INSERT INTO PresetPizza(BasicPizzaID, ToppingID)
SELECT p.PresetID, t.ToppingID
FROM BasicPizza as p, Toppings as t
WHERE p.Type = 'Hawaiian Pizza' AND T.PizzaTypeCompID = (SELECT Comps.CompID FROM Comps WHERE Comps.Name = 'peppers') AND T.StoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK') AND p.AStoreStoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK')
INSERT INTO PresetPizza(BasicPizzaID, ToppingID)
SELECT p.PresetID, t.ToppingID
FROM BasicPizza as p, Toppings as t
WHERE p.Type = 'Hawaiian Pizza' AND T.PizzaTypeCompID = (SELECT Comps.CompID FROM Comps WHERE Comps.Name = 'pineapple') AND T.StoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK') AND p.AStoreStoreID = (SELECT StoreID FROM Stores WHERE Name = 'CPK') |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 07, 2020 at 02:37 PM
-- Server version: 5.7.29-0ubuntu0.18.04.1
-- PHP Version: 7.2.24-0ubuntu0.18.04.3
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: `asset`
--
-- --------------------------------------------------------
--
-- Table structure for table `attachments`
--
CREATE TABLE `attachments` (
`id` bigint(20) UNSIGNED NOT NULL,
`task_id` int(11) NOT NULL,
`attach` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `attachments`
--
INSERT INTO `attachments` (`id`, `task_id`, `attach`, `created_at`, `updated_at`) VALUES
(1, 1, '440681583571587.jpg', '2020-03-07 03:29:47', '2020-03-07 03:29:47'),
(2, 1, '408731583571587.jpg', '2020-03-07 03:29:47', '2020-03-07 03:29:47'),
(3, 2, '150741583571651.jpg', '2020-03-07 03:30:51', '2020-03-07 03:30:51'),
(4, 2, '777091583571651.jpg', '2020-03-07 03:30:51', '2020-03-07 03:30:51');
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(74, '2014_10_12_000000_create_users_table', 1),
(75, '2014_10_12_100000_create_password_resets_table', 1),
(76, '2020_03_05_185518_create_tasks_table', 1),
(77, '2020_03_06_170330_create_attachments_table', 1);
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `tasks`
--
CREATE TABLE `tasks` (
`id` int(10) UNSIGNED NOT NULL,
`show_id` bigint(20) DEFAULT NULL,
`subject` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` text COLLATE utf8mb4_unicode_ci,
`affected_regions` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`status` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`priority` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`due_date` date NOT NULL,
`assignee` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`reviewer` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`target_version` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`reviewer_comments` text COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `tasks`
--
INSERT INTO `tasks` (`id`, `show_id`, `subject`, `description`, `affected_regions`, `status`, `priority`, `due_date`, `assignee`, `reviewer`, `target_version`, `reviewer_comments`, `created_at`, `updated_at`) VALUES
(1, NULL, 'Subject Assignment 1', 'Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.', 'a:2:{i:0;s:6:\"Europe\";i:1;s:5:\"India\";}', 'New', 'Low', '2020-03-14', 'Dev 2', 'Dev 3', '1.0.1', 'This is reviewer comment', '2020-03-07 03:29:47', '2020-03-07 03:29:47'),
(2, NULL, 'Subject Assignment 2', 'Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.', 'N;', 'Assigned', 'Medium', '2020-03-13', 'Dev 4', 'Dev 3', '1.1.1', 'This is reviewer comment', '2020-03-07 03:30:51', '2020-03-07 03:30:51');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `attachments`
--
ALTER TABLE `attachments`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `tasks`
--
ALTER TABLE `tasks`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `tasks_subject_unique` (`subject`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `attachments`
--
ALTER TABLE `attachments`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=78;
--
-- AUTO_INCREMENT for table `tasks`
--
ALTER TABLE `tasks`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
/*!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 */;
|
<gh_stars>0
----------Versioning database---------------
IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name='versioning')
EXEC sp_executesql N'CREATE SCHEMA [versioning]'
GO
IF OBJECT_ID('[versioning].[SchemaVersion]') IS NULL
BEGIN
CREATE TABLE [versioning].[SchemaVersion]
(
[SchemaVersionID] INT PRIMARY KEY IDENTITY,
[ValidFrom] DATETIME NOT NULL,
[ValidTo] DATETIME NULL,
[Major] INT NOT NULL,
[Minor] INT NOT NULL,
[Build] INT NOT NULL,
[Revision] INT NOT NULL,
[ProgressSqlStatement] NVARCHAR(MAX) NOT NULL,
[RevertSqlStatement] NVARCHAR(MAX) NOT NULL,
[Comment] NVARCHAR(MAX)
);
END
GO
IF NOT EXISTS (SELECT TOP 1 * FROM [versioning].[SchemaVersion])
BEGIN
INSERT INTO [versioning].[SchemaVersion]
([ValidFrom], [ValidTo], [Major], [Minor], [Build], [Revision], [ProgressSqlStatement], [RevertSqlStatement])
VALUES
(GETUTCDATE(), NULL, 1, 0, 0, 0, '', '')
END
GO
------------------------------------------------------------------------
--------------------Checks if a database exists.------------------------
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND SCHEMA_NAME(schema_id) = 'versioning' AND name = 'ExistsDatabase')
DROP PROCEDURE [versioning].[ExistsDatabase]
GO
CREATE PROCEDURE [versioning].[ExistsDatabase]
(
@_TargetDatabase NVARCHAR(255),
@Exists BIT OUTPUT
)
AS
BEGIN
IF (EXISTS (
SELECT [Databases].[name]
FROM [master].[dbo].[sysdatabases] AS [Databases]
WHERE ([Databases].[name] = @_TargetDatabase)
))
BEGIN
SELECT @Exists = 1;
END
ELSE
BEGIN
SELECT @Exists = 0;
END
END
GO
IF OBJECT_ID('[versioning].[TargetDataBases]') IS NULL
CREATE TABLE [versioning].[TargetDataBases](
DbName NVARCHAR(255) PRIMARY KEY NOT NULL
);
GO
------------------------------------------------------------------------
----------------Adds a database to the version control.-----------------
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND SCHEMA_NAME(schema_id) = 'versioning' AND name = 'AddTargetDatabase')
DROP PROCEDURE [versioning].[AddTargetDatabase]
GO
CREATE PROCEDURE [versioning].[AddTargetDatabase]
(
@TargetDatabase NVARCHAR(255),
@Success BIT OUTPUT
)
AS
-- Creates a version schema in the target database.
-- Creates a table in the version schema to track current version of database and to log version history.
-- Adds the database to the list of databases to be tracked. Stored in table [versioning].[TargetDatabases].
-- Parameters:
-- @TargetDatabase - Database to be added to the version system.
BEGIN
SET @Success = 0;
IF(LOWER(@TargetDatabase)=LOWER(DB_NAME()))
BEGIN
RAISERROR('[AddTargetDatabase]: Cannot use the version control database as target.', 16, 1);
END
DECLARE @ExistsDatabase BIT = 0;
EXEC [versioning].[ExistsDatabase] @_TargetDatabase=@TargetDatabase, @Exists=@ExistsDatabase OUTPUT
IF (@ExistsDataBase=1)
BEGIN
EXEC('
USE ' + @TargetDatabase +';
IF NOT EXISTS (
SELECT SCHEMA_NAME
FROM [INFORMATION_SCHEMA].[SCHEMATA]
WHERE SCHEMA_NAME = ''targetversioning''
)
BEGIN
EXEC sp_executesql N''CREATE SCHEMA targetversioning''
END
'
);
DECLARE @TargetSchemaVersion NVARCHAR(255) = '[' + @TargetDatabase + '].[targetversioning].[SchemaVersion]';
EXEC('
IF (
NOT EXISTS (SELECT *
FROM [' + @TargetDatabase + '].[INFORMATION_SCHEMA].[TABLES]
WHERE TABLE_SCHEMA = ''targetversioning''
AND TABLE_NAME = ''SchemaVersion'')
)
BEGIN
CREATE TABLE ' + @TargetSchemaVersion + '
(
[SchemaVersionID] INT PRIMARY KEY,
[ValidFrom] DATETIME NOT NULL,
[ValidTo] DATETIME NULL,
[Major] INT NOT NULL,
[Minor] INT NOT NULL,
[Build] INT NOT NULL,
[Revision] INT NOT NULL
)
END
');
INSERT INTO [versioning].[TargetDataBases]
(
[DbName]
) SELECT @TargetDatabase
WHERE NOT EXISTS ( SELECT TOP 1 [DbName] FROM [versioning].[TargetDataBases] WHERE [DbName]=@TargetDatabase);
IF OBJECT_ID(@TargetSchemaVersion) IS NOT NULL
BEGIN
EXEC('
INSERT INTO ' + @TargetSchemaVersion + '
(
[SchemaVersionID],
[ValidFrom],
[Major],
[Minor],
[Build],
[Revision]
) SELECT 1, GETUTCDATE(), 1, 0, 0, 0
WHERE NOT EXISTS(SELECT TOP 1 * FROM ' + @TargetSchemaVersion + ' AS [TargetSchemaVersion])'
);
END
SET @Success = 1;
END
ELSE
BEGIN
RAISERROR('[AddTargetDatabase]: No database with that name.', 16, 1);
END
END
GO
------------------------------------------------------------------------
-----------------------Breaks version into four integer.----------------
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND SCHEMA_NAME(schema_id) = 'versioning' AND name = 'GetVersionParts')
DROP PROCEDURE [versioning].[GetVersionParts]
GO
-- Breaks version into four integers, representing major version number,
-- minor version number, revision number and build number.
-- Parameters:
-- @version - Version specified as dot-separated segments (e.g. 1.2.3.4)
-- @major - On output major version number extracted from @version
-- @minor - On output minor version number extracted from @version
-- @build - On output build number extracted from @version
-- @revision - On output revision number extracted from @version
CREATE PROCEDURE [versioning].[GetVersionParts]
@version NVARCHAR(255),
@major INT OUT,
@minor INT OUT,
@build INT OUT,
@revision INT OUT
AS
BEGIN
DECLARE @startPos INT = 1
DECLARE @endPos INT
SET @endPos = CHARINDEX('.', @version, @startPos)
SET @major = CAST(SUBSTRING(@version, @startPos, @endPos - @startPos) AS INT)
SET @startPos = @endPos + 1
SET @endPos = CHARINDEX('.', @version, @startPos)
SET @minor = CAST(SUBSTRING(@version, @startPos, @endPos - @startPos) AS INT)
SET @startPos = @endPos + 1
SET @endPos = CHARINDEX('.', @version, @startPos)
SET @build = CAST(SUBSTRING(@version, @startPos, @endPos - @startPos) AS INT)
SET @startPos = @endPos + 1
SET @endPos = LEN(@version) + 1
SET @revision = CAST(SUBSTRING(@version, @startPos, @endPos - @startPos) AS INT)
END
GO
IF EXISTS(SELECT * FROM sys.objects WHERE type = 'V' AND SCHEMA_NAME(schema_id) = 'versioning' AND name = 'LatestVersion')
DROP VIEW [versioning].[LatestVersion];
GO
CREATE VIEW [versioning].[LatestVersion] AS
SELECT TOP 1 * FROM [versioning].[SchemaVersion]
ORDER BY [Major] DESC, [Minor] DESC, [Build] DESC, [Revision] DESC
GO
IF EXISTS(SELECT * FROM sys.objects WHERE type = 'V' AND SCHEMA_NAME(schema_id) = 'versioning' AND name = 'LatestCompleteVersion')
DROP VIEW [versioning].[LatestCompleteVersion];
GO
CREATE VIEW [versioning].[LatestCompleteVersion] AS
SELECT TOP 1 * FROM [versioning].[SchemaVersion]
WHERE [Build]%2=0
ORDER BY [Major] DESC, [Minor] DESC, [Build] DESC, [Revision] DESC
GO
------------------------------------------------------------------------
-------------------------Begin new version.-----------------------------
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND SCHEMA_NAME(schema_id) = 'versioning' AND name = 'BeginNewVersion')
DROP PROCEDURE [versioning].[BeginNewVersion]
GO
--Begin new version, requires nextrevision to be odd and newversion > oldversion
--Sets revision number to 0.
CREATE PROCEDURE [versioning].[BeginNewVersion]
(
@NextVersion NVARCHAR(255),
@Success BIT OUTPUT,
@Comment NVARCHAR(255) = NULL
)
AS
BEGIN
DECLARE @_success BIT = 0;
SET @Success = 0;
DECLARE @nextmajor INT, @nextminor INT, @nextbuild INT, @nextrevision INT;
EXEC [versioning].[GetVersionParts] @version=@NextVersion, @major=@nextmajor OUTPUT, @minor=@nextminor OUTPUT, @build=@nextbuild OUTPUT, @revision=@nextrevision OUTPUT;
DECLARE @CurrentSchemaVersionID INT, @currentmajor INT, @currentminor INT, @currentbuild INT, @currentrevision INT;
SELECT
@CurrentSchemaVersionID=[versioning].[LatestCompleteVersion].[SchemaVersionID],
@currentmajor=[versioning].[LatestCompleteVersion].[Major],
@currentminor=[versioning].[LatestCompleteVersion].[Minor],
@currentbuild=[versioning].[LatestCompleteVersion].[Build],
@currentrevision=[versioning].[LatestCompleteVersion].[Revision]
FROM [versioning].[LatestCompleteVersion];
IF @nextmajor < @currentmajor
SET @_success = 0;
ELSE IF @nextmajor>@currentmajor
SET @_success = 1;
ELSE IF @nextminor < @currentminor
SET @_success = 0;
ELSE IF @nextminor > @currentminor
SET @_success = 1;
ELSE IF @nextbuild < @currentbuild
SET @_success = 0;
ELSE IF @nextbuild > @currentbuild
SET @_success = 1;
IF(@nextbuild%2=0)
BEGIN
RAISERROR('[BeginNewVersion]: Build component of the next version has to be odd.', 16, 1);
END
IF(@currentbuild%2=1)
BEGIN
RAISERROR('
Build component of the current version is odd.
This mean that the current version is not complete.
Cannot begin a new version when on an incomplete version.', 16, 1);
END
IF (@_success=1)
BEGIN
INSERT INTO [versioning].[SchemaVersion]
([ValidFrom], [ValidTo], [Major], [Minor], [Build], [Revision], [ProgressSqlStatement], [RevertSqlStatement], [Comment])
VALUES
(GETUTCDATE(), NULL, @nextmajor, @nextminor, @nextbuild, 0, '', '', @Comment);
UPDATE [versioning].[SchemaVersion]
SET [versioning].[SchemaVersion].[ValidTo]=GETUTCDATE()
WHERE [versioning].[SchemaVersion].[SchemaVersionID]=@CurrentSchemaVersionID;
END
ELSE
BEGIN
RAISERROR('[BeginNewVersion]: Invalid Parameter @NextVersion', 16, 1);
END
SET @Success = @_success;
END
GO
------------------------------------------------------------------------
---------------------- -Adds a revision to the build-------------------
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND SCHEMA_NAME(schema_id) = 'versioning' AND name = 'AddRevision')
DROP PROCEDURE [versioning].[AddRevision]
GO
CREATE PROCEDURE [versioning].[AddRevision]
(
@VersionBase NVARCHAR(255),
@ProgressSqlStatement NVARCHAR(MAX),
@RevertSqlStatement NVARCHAR(MAX),
@Comment NVARCHAR(MAX) = NULL,
@Success BIT OUTPUT
)
AS
-- When creating a new version the build is incremented to an odd number.
-- So if current version is 1.2.2.0 adding a new version increments build number -> 1.2.3.0
-- Then for each Sql statement that con
-- Adds a revision to the new build of the schema.
-- Should only increment the revision for the next version.
-- Parameters:
-- @VersionBase - Base version of the next version. Revision: 1.1.3.10 base -> 1.1.3.0, next version -> 1.1.4.0
-- @ProgressSqlStatement - Statement that defines the modification of the database.
-- @RevertSqlStatement - Statement that reverts back to the previous version of the database.
-- @Comment - Describes the change in the database and it's purpose.
-- @Success - Controll bit to notify if the revision change input was valid.
BEGIN
IF (@ProgressSqlStatement IS NULL)
BEGIN
RAISERROR('[AddRevision]: Invalid Parameter @ProgressSqlStatement', 16, 1);
END
IF (@RevertSqlStatement IS NULL)
BEGIN
RAISERROR('[AddRevision]: Invalid Parameter @RevertSqlStatement', 16, 1);
END
DECLARE @majorInput INT, @minorInput INT, @buildInput INT, @RevisionbaseInput INT;
EXEC [versioning].[GetVersionParts] @version=@VersionBase, @major=@majorInput OUTPUT, @minor=@minorInput OUTPUT, @build=@buildInput OUTPUT, @revision=@RevisionbaseInput OUTPUT;
DECLARE @CurrentSchemaVersionID INT, @currentmajor INT, @currentminor INT, @currentbuild INT, @currentrevision INT;
SELECT
@CurrentSchemaVersionID=[versioning].[LatestVersion].[SchemaVersionID],
@currentmajor=[versioning].[LatestVersion].[Major],
@currentminor=[versioning].[LatestVersion].[Minor],
@currentbuild=[versioning].[LatestVersion].[Build],
@currentrevision=[versioning].[LatestVersion].[Revision]
FROM [versioning].[LatestVersion];
SET @Success = 0;
IF @currentmajor=@majorInput AND @currentminor=@minorInput AND @currentbuild=@buildInput AND @RevisionbaseInput=0
BEGIN
DECLARE @nextRevision INT = @currentrevision + 1;
INSERT INTO [versioning].[SchemaVersion]
([ValidFrom], [ValidTo], [Major], [Minor], [Build], [Revision], [ProgressSqlStatement], [RevertSqlStatement], [Comment])
VALUES
(GETUTCDATE(), NULL, @currentmajor, @currentminor, @currentbuild, @nextRevision, @ProgressSqlStatement, @RevertSqlStatement, @Comment);
UPDATE [versioning].[SchemaVersion]
SET [versioning].[SchemaVersion].[ValidTo]=GETUTCDATE()
WHERE [versioning].[SchemaVersion].[SchemaVersionID]=@CurrentSchemaVersionID;
SET @Success=1;
END
ELSE
BEGIN
RAISERROR('[AddRevision]: Invalid Parameter @VersionBase', 16, 1);
END
END
GO
------------------------------------------------------------------------
-------------------------Completes a version.---------------------------
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND SCHEMA_NAME(schema_id) = 'versioning' AND name = 'CompleteNewVersion')
DROP PROCEDURE [versioning].[CompleteNewVersion]
GO
CREATE PROCEDURE [versioning].[CompleteNewVersion]
(
@Success BIT OUTPUT,
@Comment NVARCHAR(255) = NULL
)
AS
BEGIN
SET @Success = 0;
DECLARE @CurrentSchemaVersionID INT, @major INT, @minor INT, @incomplete_build INT, @revision INT;
SELECT
@CurrentSchemaVersionID=[versioning].[LatestVersion].[SchemaVersionID],
@major=[versioning].[LatestVersion].[Major],
@minor=[versioning].[LatestVersion].[Minor],
@incomplete_build=[versioning].[LatestVersion].[Build],
@revision=[versioning].[LatestVersion].[Revision]
FROM [versioning].[LatestVersion];
IF (@incomplete_build%2=1)
BEGIN
INSERT INTO [versioning].[SchemaVersion]
([ValidFrom], [ValidTo], [Major], [Minor], [Build], [Revision], [ProgressSqlStatement], [RevertSqlStatement], [Comment])
VALUES
(GETUTCDATE(), NULL, @major, @minor, @incomplete_build+1, 0, '', '', @Comment);
UPDATE [versioning].[SchemaVersion]
SET [versioning].[SchemaVersion].[ValidTo]=GETUTCDATE()
WHERE [versioning].[SchemaVersion].[SchemaVersionID]=@CurrentSchemaVersionID;
SET @Success=1;
END
ELSE
BEGIN
RAISERROR('[CompleteNewVersion]: The latest version is a complete version and cannot therefore not be further completed.', 16, 1);
END
END
GO
------------------------------------------------------------------------
----------------------Get version of the database.----------------------
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND SCHEMA_NAME(schema_id) = 'versioning' AND name = 'GetVersionOfDatabase')
DROP PROCEDURE [versioning].[GetVersionOfDatabase]
GO
CREATE PROCEDURE [versioning].[GetVersionOfDatabase]
(
@TargetDatabase NVARCHAR(255),
@DBVersionOUT NVARCHAR(255) OUTPUT,
@Success BIT OUTPUT
)
AS
BEGIN
SET @Success = 0;
IF EXISTS(
SELECT TOP 1 [DbName] FROM [versioning].[TargetDataBases] WHERE [DbName]=@TargetDatabase
)
BEGIN
DECLARE @TargetSchemaVersion NVARCHAR(255) = '[' + @TargetDatabase + '].[targetversioning].[SchemaVersion]';
DECLARE @SQLString NVARCHAR(MAX);
DECLARE @version_internal NVARCHAR(255);
DECLARE @ParmDefinition NVARCHAR(255);
SET @SQLString = N'
SELECT TOP 1 @VersionOUT=CONCAT(CONVERT(NVARCHAR(255), [Major]),CONVERT(NVARCHAR(255), [Minor]), CONVERT(NVARCHAR(255), [Build]), CONVERT(NVARCHAR(255), [Revision]))
FROM ' + @TargetSchemaVersion + N'
ORDER BY [Major], [Minor], [Build], [Revision]';
SET @ParmDefinition = N'@VersionOUT NVARCHAR(255) OUTPUT';
EXECUTE sp_executesql
@SQLString,
@ParmDefinition,
@VersionOUT= @version_internal OUTPUT;
SET @DBVersionOUT = @version_internal;
SET @Success = 1;
END
ELSE
BEGIN
RAISERROR('[GetVersionOfDatabase]: There is not Target Database with the name.', 16, 1);
END
END
GO |
<filename>_arquivos/database_alexmadeira.sql
-- phpMyAdmin SQL Dump
-- version 4.2.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 12, 2015 at 11:01 AM
-- Server version: 5.5.35-0ubuntu0.12.04.2-log
-- PHP Version: 5.4.27-1+deb.sury.org~precise+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `database_alexmadeira`
--
-- --------------------------------------------------------
--
-- Table structure for table `akkedis_configuracoes`
--
CREATE TABLE IF NOT EXISTS `akkedis_configuracoes` (
`configuracao_id` int(11) NOT NULL,
`configuracao_nome_site` varchar(255) DEFAULT NULL,
`configuracao_email` varchar(255) DEFAULT NULL,
`configuracao_status` tinyint(4) DEFAULT NULL,
`configuracao_autorizacao_ip` text,
`configuracao_seo_site_title` varchar(255) DEFAULT NULL,
`configuracao_seo_keywords` varchar(255) DEFAULT NULL,
`configuracao_seo_description` text,
`configuracao_analytics_profile_id` varchar(255) DEFAULT NULL,
`configuracao_analytics_acompanhamneto_id` varchar(255) DEFAULT NULL,
`configuracao_analytics_email_analytics` varchar(255) DEFAULT NULL,
`configuracao_analytics_senha_analytics` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `akkedis_configuracoes`
--
INSERT INTO `akkedis_configuracoes` (`configuracao_id`, `configuracao_nome_site`, `configuracao_email`, `configuracao_status`, `configuracao_autorizacao_ip`, `configuracao_seo_site_title`, `configuracao_seo_keywords`, `configuracao_seo_description`, `configuracao_analytics_profile_id`, `configuracao_analytics_acompanhamneto_id`, `configuracao_analytics_email_analytics`, `configuracao_analytics_senha_analytics`) VALUES
(1, 'akkedis', '<EMAIL>', 2, '192.168.0.3', 'akkedis', 'akkedis, akkedis cms E-commerce, e-commerce admim', 'uma descrição', '8682239', 'UA-4329276-1', '<EMAIL>', 'vdvd5070');
-- --------------------------------------------------------
--
-- Table structure for table `trooper_agencias`
--
CREATE TABLE IF NOT EXISTS `trooper_agencias` (
`agencia_id` int(11) NOT NULL,
`agencia_nome` varchar(255) NOT NULL,
`agencia_class` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
--
-- Dumping data for table `trooper_agencias`
--
INSERT INTO `trooper_agencias` (`agencia_id`, `agencia_nome`, `agencia_class`) VALUES
(1, 'Sta Monica', 'staMonica'),
(2, 'Dainet', 'dainet'),
(3, '<NAME>', 'guisbolso'),
(4, 'UltraHaus', 'ultrahaus'),
(5, 'Garage', 'garage'),
(6, '<NAME>', 'alexMadeira');
-- --------------------------------------------------------
--
-- Table structure for table `trooper_arquivos`
--
CREATE TABLE IF NOT EXISTS `trooper_arquivos` (
`arquivo_id` int(11) NOT NULL,
`arquivo_nome` varchar(255) NOT NULL,
`arquivo_tipo` tinyint(1) NOT NULL DEFAULT '1',
`arquivo_arquivo` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=397 ;
--
-- Dumping data for table `trooper_arquivos`
--
INSERT INTO `trooper_arquivos` (`arquivo_id`, `arquivo_nome`, `arquivo_tipo`, `arquivo_arquivo`) VALUES
(320, '<NAME> adnews background', 1, 'alex-madeira-adnews-background.jpg'),
(321, '<NAME> Adnews desktop', 1, 'alex-madeira-Adnews-desktop.png'),
(322, '<NAME> adnews logo', 1, 'alex-madeira-adnews-logo.png'),
(323, '<NAME> Adnews mobile home', 1, 'alex-madeira-Adnews-mobile-home.png'),
(324, '<NAME> Adnews mobile noticia', 1, 'alex-madeira-Adnews-mobile-noticia.png'),
(325, '<NAME> bg adnews', 1, 'alex-madeira-bg-adnews.jpg'),
(326, '<NAME> adnews preview', 1, 'alex-madeira-adnews-preview.jpg'),
(327, '<NAME> game 7 logo', 1, 'alex-madeira-game-7-logo.png'),
(328, '<NAME> game 7 preview', 1, 'alex-madeira-game-7-preview.jpg'),
(329, '<NAME> game7 desktop', 1, 'alex-madeira-game7-desktop.png'),
(330, '<NAME>ira bg game 7 day 7', 1, 'alex-madeira-bg-game-7-day-7.jpg'),
(331, '<NAME>ira game7 mobile v2', 1, 'alex-madeira-game7-mobile-v2.png'),
(332, '<NAME> game7 mobile v1', 1, 'alex-madeira-game7-mobile-v1.png'),
(333, '<NAME> game7 produto fone', 1, 'alex-madeira-game7-produto-fone.png'),
(334, '<NAME>', 1, 'alex-madeira-HiperVarejo-preview.jpg'),
(335, '<NAME>jo mobile home', 1, 'alex-madeira-hipervarejo-mobile-home.png'),
(336, '<NAME>pervarejo desktop', 1, 'alex-madeira-hipervarejo-desktop.png'),
(338, '<NAME> premium', 1, 'alex-madeira-hipervarejo-premium.png'),
(340, '<NAME>', 1, 'alex-madeira-hipervarejo-pneu.png'),
(343, '<NAME> mobile premium', 1, 'alex-madeira-hipervarejo-mobile-premium.png'),
(344, '<NAME>ira mobile home', 1, 'alex-madeira-alan-madeira-mobile-home.png'),
(345, '<NAME> bg alan madeira', 1, 'alex-madeira-bg-alan-madeira.jpg'),
(346, '<NAME>ira desktop', 1, 'alex-madeira-alan-madeira-desktop.png'),
(347, '<NAME>ira logo', 1, 'alex-madeira-alan-madeira-logo.png'),
(350, '<NAME> MizunoBR background', 1, 'alex-madeira-MizunoBR-background.jpg'),
(351, '<NAME> MizunoBR logo', 1, 'alex-madeira-MizunoBR-logo.png'),
(352, '<NAME> mizunoBR desktop', 1, 'alex-madeira-mizunoBR-desktop.png'),
(353, '<NAME> mizunoBR mobile home', 1, 'alex-madeira-mizunoBR-mobile-home.png'),
(354, '<NAME> MizunoBR tenis', 1, 'alex-madeira-MizunoBR-tenis.png'),
(355, '<NAME> MizunoBR preview', 1, 'alex-madeira-MizunoBR-preview.jpg'),
(357, '<NAME> bg MizunoBR', 1, 'alex-madeira-bg-MizunoBR.jpg'),
(358, '<NAME> MizunoBR mobile produto', 1, 'alex-madeira-MizunoBR-mobile-produto.png'),
(359, '<NAME> mobile portifolio', 1, 'alex-madeira-alan-madeira-mobile-portifolio.png'),
(360, '<NAME> preview', 1, 'alex-madeira-alan-madeira-preview.jpg'),
(364, '<NAME>ira ilustracao', 1, 'alex-madeira-alan-madeira-ilustracao.png'),
(369, '<NAME>ira background', 1, 'alex-madeira-alan-madeira-background.jpg'),
(370, '<NAME> game7 background', 1, 'alex-madeira-game7-background.jpg'),
(387, '<NAME> adnews publicidade', 1, 'alex-madeira-adnews-publicidade.png'),
(388, '<NAME> hipervarejo background', 1, 'alex-madeira-hipervarejo-background.jpg'),
(389, '<NAME> hipervarejo mobile home1', 1, 'alex-madeira-hipervarejo-mobile-home1.png'),
(391, '<NAME> HiperVarejo logo', 1, 'alex-madeira-HiperVarejo-logo.png'),
(394, '<NAME> drinkfinity logo', 1, 'alex-madeira-drinkfinity-logo.png'),
(395, '<NAME> drinkfinity background', 1, 'alex-madeira-drinkfinity-background.jpg'),
(396, '2015021209475336246', 1, '2015021209475336246.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `trooper_categorias`
--
CREATE TABLE IF NOT EXISTS `trooper_categorias` (
`categoria_id` int(11) NOT NULL,
`categoria_nome` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `trooper_categorias`
--
INSERT INTO `trooper_categorias` (`categoria_id`, `categoria_nome`) VALUES
(1, 'Web');
-- --------------------------------------------------------
--
-- Table structure for table `trooper_projetos`
--
CREATE TABLE IF NOT EXISTS `trooper_projetos` (
`projeto_id` int(11) NOT NULL,
`projeto_slug` varchar(255) NOT NULL,
`projeto_logo` int(11) NOT NULL,
`projeto_background_principal` int(11) NOT NULL,
`projeto_preview` int(11) NOT NULL,
`projeto_mobile1` int(11) NOT NULL,
`projeto_mobile2` int(11) NOT NULL,
`projeto_produto` int(11) NOT NULL,
`projeto_background` int(11) NOT NULL,
`projeto_desktop` int(11) NOT NULL,
`projeto_nome` varchar(255) NOT NULL,
`projeto_slogan` varchar(255) NOT NULL,
`projeto_categoria` int(11) NOT NULL,
`projeto_tipo` int(11) NOT NULL,
`projeto_agencia` int(11) NOT NULL,
`projeto_ano` int(11) NOT NULL,
`projeto_descricao` text NOT NULL,
`projeto_ordem` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
--
-- Dumping data for table `trooper_projetos`
--
INSERT INTO `trooper_projetos` (`projeto_id`, `projeto_slug`, `projeto_logo`, `projeto_background_principal`, `projeto_preview`, `projeto_mobile1`, `projeto_mobile2`, `projeto_produto`, `projeto_background`, `projeto_desktop`, `projeto_nome`, `projeto_slogan`, `projeto_categoria`, `projeto_tipo`, `projeto_agencia`, `projeto_ano`, `projeto_descricao`, `projeto_ordem`) VALUES
(10, 'game-7', 327, 370, 328, 332, 331, 333, 330, 329, 'Game 7', 'A sua loja Gamer', 1, 1, 1, 2015, 'Ao longo dos anos, a Game7 estabeleceu-se como a loja dos jogadores que se conecta com todos os jogadores, independentemente da idade, gênero de jogos e console, permanecendo fiel à sua missão, e entregar continuamente o melhor. ', 0),
(11, 'hiper-varejo', 391, 388, 334, 343, 335, 340, 338, 336, '<NAME>', '<NAME> a Pronta Entrega do Brasil ', 1, 1, 1, 2015, 'A Hipervarejo é o canal eletrônico de um grupo que possui mais de 30 anos de mercado, tendo parceria com as principais fabricantes nacionais e internacionais. Localizado em um complexo logístico estruturado para atender a todo Brasil, possui um moderno centro de distribuição com 22 mil m².', 4),
(13, 'adnews', 322, 320, 326, 323, 324, 387, 325, 321, 'Adnews', 'Movido Pela Notícia', 1, 2, 2, 2014, 'Criado em 1999, o Adnews é um portal direcionado ao mercado publicitário e voltado à convergência das mídias. Abordamos e repercutimos notícias relacionadas a diversos assuntos como Mídia, Internet, Publicidade, Tecnologia, Cultura e Negócios.', 3),
(14, 'mizuno-br', 351, 350, 355, 353, 358, 354, 357, 352, 'Mizuno BR', 'Never Settle', 1, 2, 5, 2012, 'A Mizuno tem produtos específicos para cada tipo de atleta. Tecnologias que melhoram o desempenho, que evitam lesões, que estão a favor do corpo e da saúde.\r\nNão é de hoje. Isso está no DNA da marca.', 4),
(15, 'alan-madeira', 347, 369, 360, 344, 359, 364, 345, 346, '<NAME>', 'Direção de arte e Ilustração', 1, 2, 6, 2015, 'Eu estou sempre fazendo aquilo que não sou capaz, numa tentativa de aprender como fazê-lo. <br /> -<NAME>', 2),
(16, 'drinkfinity', 394, 395, 0, 0, 0, 0, 396, 0, 'DrinkFinity', 'Viva com paixão. Beba com propósito.', 1, 1, 1, 2015, 'Com Drinkfinity, você pode personalizar sua hidratação de acordo com as suas necessidades. Os Pods contêm uma mistura de ingredientes líquidos e em pó que adicionam sabor e propósito à sua água. O Vessel é uma garrafa de água conveniente e reutilizável que te ajuda a se manter hidratado.', 1);
-- --------------------------------------------------------
--
-- Table structure for table `trooper_tipos`
--
CREATE TABLE IF NOT EXISTS `trooper_tipos` (
`tipo_id` int(11) NOT NULL,
`tipo_nome` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `trooper_tipos`
--
INSERT INTO `trooper_tipos` (`tipo_id`, `tipo_nome`) VALUES
(1, 'e-commerce'),
(2, 'Site');
-- --------------------------------------------------------
--
-- Table structure for table `trooper_usuarios`
--
CREATE TABLE IF NOT EXISTS `trooper_usuarios` (
`usuario_id` int(11) NOT NULL,
`usuario_nome` varchar(255) NOT NULL,
`usuario_email` varchar(255) NOT NULL,
`usuario_senha` varchar(32) NOT NULL,
`usuario_salt` varchar(32) NOT NULL,
`usuario_status` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `trooper_usuarios`
--
INSERT INTO `trooper_usuarios` (`usuario_id`, `usuario_nome`, `usuario_email`, `usuario_senha`, `usuario_salt`, `usuario_status`) VALUES
(1, '<NAME>', '<EMAIL>', '52bd2720318382fbca5d978713b78363', '8e4f360b', 1);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `akkedis_configuracoes`
--
ALTER TABLE `akkedis_configuracoes`
ADD PRIMARY KEY (`configuracao_id`);
--
-- Indexes for table `trooper_agencias`
--
ALTER TABLE `trooper_agencias`
ADD PRIMARY KEY (`agencia_id`);
--
-- Indexes for table `trooper_arquivos`
--
ALTER TABLE `trooper_arquivos`
ADD PRIMARY KEY (`arquivo_id`);
--
-- Indexes for table `trooper_categorias`
--
ALTER TABLE `trooper_categorias`
ADD PRIMARY KEY (`categoria_id`);
--
-- Indexes for table `trooper_projetos`
--
ALTER TABLE `trooper_projetos`
ADD PRIMARY KEY (`projeto_id`);
--
-- Indexes for table `trooper_tipos`
--
ALTER TABLE `trooper_tipos`
ADD PRIMARY KEY (`tipo_id`);
--
-- Indexes for table `trooper_usuarios`
--
ALTER TABLE `trooper_usuarios`
ADD PRIMARY KEY (`usuario_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `akkedis_configuracoes`
--
ALTER TABLE `akkedis_configuracoes`
MODIFY `configuracao_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `trooper_agencias`
--
ALTER TABLE `trooper_agencias`
MODIFY `agencia_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `trooper_arquivos`
--
ALTER TABLE `trooper_arquivos`
MODIFY `arquivo_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=397;
--
-- AUTO_INCREMENT for table `trooper_categorias`
--
ALTER TABLE `trooper_categorias`
MODIFY `categoria_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `trooper_projetos`
--
ALTER TABLE `trooper_projetos`
MODIFY `projeto_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `trooper_tipos`
--
ALTER TABLE `trooper_tipos`
MODIFY `tipo_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `trooper_usuarios`
--
ALTER TABLE `trooper_usuarios`
MODIFY `usuario_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
/*!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 */;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.