1.17 Proj 0: Data Mining - Post MySQL Queries
1.17 Proj 0: Data Mining - Post MySQL Queries
Review the query projects by Christo de Clerck https://docs.google.com/document/d/1fK4 ... t?hl=en_US and Matthew Willse https://docs.google.com/document/d/1Hpe ... t?hl=en_US
Following their model, post the following:
Data Mining Question
The Sql Query
Explanation of the query
Processing Time
Comment & Analysis
Following their model, post the following:
Data Mining Question
The Sql Query
Explanation of the query
Processing Time
Comment & Analysis
George Legrady
legrady@mat.ucsb.edu
legrady@mat.ucsb.edu
Re: w2 Jan 17 - Data Mining I: Post MySQL Queries
- Attachments
-
- RJDuran-MAT259Assignment1-Query.pdf
- (67.09 KiB) Downloaded 449 times
Last edited by rjduranjr on Fri Feb 10, 2012 7:44 pm, edited 1 time in total.
-
- Posts: 10
- Joined: Tue Jan 17, 2012 4:41 pm
Re: w2 Jan 17 - Data Mining I: Post MySQL Queries
Last edited by anisbharon on Sun Feb 12, 2012 5:19 pm, edited 1 time in total.
-
- Posts: 9
- Joined: Tue Jan 17, 2012 4:40 pm
Re: w2 Jan 17 - Data Mining I: Post MySQL Queries - Ankit
Please find my writeup, query and some mock visualization (using gnuplot) here -
https://docs.google.com/document/d/1Ufh ... 67t1s/edit
--
Ankit
https://docs.google.com/document/d/1Ufh ... 67t1s/edit
--
Ankit
-
- Posts: 7
- Joined: Tue Jan 17, 2012 4:42 pm
Re: w2 Jan 17 - Data Mining I: Post MySQL Queries
Last edited by davidgordonartist on Tue Jan 24, 2012 12:56 pm, edited 1 time in total.
-
- Posts: 4
- Joined: Tue Jan 17, 2012 4:39 pm
-
- Posts: 10
- Joined: Fri Sep 24, 2010 1:26 pm
Re: w2 Jan 17 - Data Mining I: Post MySQL Queries
Hey Yoon,
I think this query is actually closer to what you want. Saying year(ckoutDateTime) = 2011 isn't necessary because we're saying that the ckoutDateTime has to be after 2011-09-04. Also you need parenthesis around the title and subject criteria because otherwise the OR will make MySQL ignore the ckoutDateTime >= '2011-09-04' part:
SELECT
count(*)
FROM transactions2011
WHERE
ckoutDateTime >= '2011-09-04'
AND (TITLE LIKE "%Steve Jobs%"
OR subject1 like "%Steve Jobs%"
OR subject2 like "%Steve Jobs%"
OR subject3 like "%Steve Jobs%"
OR subject4 like "%Steve Jobs%"
OR subject5 like "%Steve Jobs%")
ORDER BY ckoutDateTime;
I think this query is actually closer to what you want. Saying year(ckoutDateTime) = 2011 isn't necessary because we're saying that the ckoutDateTime has to be after 2011-09-04. Also you need parenthesis around the title and subject criteria because otherwise the OR will make MySQL ignore the ckoutDateTime >= '2011-09-04' part:
SELECT
count(*)
FROM transactions2011
WHERE
ckoutDateTime >= '2011-09-04'
AND (TITLE LIKE "%Steve Jobs%"
OR subject1 like "%Steve Jobs%"
OR subject2 like "%Steve Jobs%"
OR subject3 like "%Steve Jobs%"
OR subject4 like "%Steve Jobs%"
OR subject5 like "%Steve Jobs%")
ORDER BY ckoutDateTime;
-
- Posts: 7
- Joined: Tue Jan 17, 2012 4:43 pm
Re: w2 Jan 17 - Data Mining I: Post MySQL Queries
- Attachments
-
- 259B Assignment.1_Mercer.pdf
- (48.44 KiB) Downloaded 459 times