[英]How can I write simple data mining queries for the following schemas?
For the following given schema, can I please guided on how to write simple Data mining queries using oracle with sqlplus?对于以下给定的模式,我能否指导如何使用 oracle 和 sqlplus 编写简单的数据挖掘查询?
CREATE TABLE Location(Location_id NUMBER(5) NOT NULL, Location_name varchar(15) NOT NULL,PRIMARY KEY (Location_id));
CREATE TABLE Customer(customer_id NUMBER(5) NOT NULL, customer_name varchar(15) NOT NULL, customer_credit NUMBER(6) NOT NULL, PRIMARY KEY (customer_id));
CREATE TABLE Product(product_id NUMBER(5) NOT NULL, product_name varchar(10) NOT NULL, product_price NUMBER(6) NOT NULL, product_quantity NUMBER(6) NOT NULL, PRIMARY KEY (product_id));
CREATE TABLE Supplier(supplier_id NUMBER(5) NOT NULL, supplier_name varchar(15) NOT NULL, supplier_quantity NUMBER(5) NOT NULL,PRIMARY KEY (supplier_id));
CREATE TABLE Store (customer_id NUMBER(5) NOT NULL, supplier_id NUMBER(5) NOT NULL, product_id NUMBER(5) NOT NULL, location_id NUMBER(5) NOT NULL,sale NUMBER(9) NOT NULL,category varchar(9) NOT NULL);
ALTER TABLE Store ADD CONSTRAINT Store_fk0 FOREIGN KEY (customer_id) REFERENCES Customer(customer_id);
ALTER TABLE Store ADD CONSTRAINT Store_fk1 FOREIGN KEY (supplier_id) REFERENCES Supplier(supplier_id);
ALTER TABLE Store ADD CONSTRAINT Store_fk2 FOREIGN KEY (product_id) REFERENCES Product(product_id);
ALTER TABLE Store ADD CONSTRAINT Store_fk3 FOREIGN KEY (location_id) REFERENCES Location(Location_id);
I have the following OLAP query which I wrote which I don't see different from a Data mining query.我编写了以下 OLAP 查询,我认为它与数据挖掘查询没有什么不同。 Also can I be guided on how to write more complex queries for the following:
我还可以指导我如何为以下内容编写更复杂的查询:
SELECT CUSTOMER.CUSTOMER_NAME,PRODUCT.PRODUCT_NAME,SALE FROM STORE INNER JOIN CUSTOMER ON STORE.CUSTOMER_ID = CUSTOMER.CUSTOMER_ID INNER JOIN PRODUCT ON STORE.PRODUCT_ID = PRODUCT.PRODUCT_ID WHERE STORE.SALE = (SELECT MAX(SALE) FROM STORE);
I will appreciate any help.我将不胜感激任何帮助。
This question is too vague to have a good answer.这个问题太模糊了,不好回答。 Please refer to Oracle Data Mining for more info about Data Mining.
有关数据挖掘的更多信息,请参阅Oracle数据挖掘。 Data Mining start from a simple query like:
数据挖掘从一个简单的查询开始,例如:
BEGIN
DBMS_PREDICTIVE_ANALYTICS.EXPLAIN(
data_table_name => 'mining_data_build_v',
explain_column_name => 'affinity_card',
result_table_name => 'ai_explain_output');
END;
/
And the skies are the limit...而天空是极限......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.