![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Aug 2003
Location: Austin, TX
Posts: 4,090
|
![]() My brain is fried right now on inner joins. I need an sql query to achieve the output results in the image below:
![]() at the end of your query would be this statement: and url_domain = 'a.com' using postgres as the db (shouldn't matter for the query if you are a mysql guru) first to get the query correct wins a t3report of your choosing (up to a 3 credit report which is a $1200 value). this is also a mini-interview as I have need for some sql/perl ppl Fight the contest!
__________________
http://www.t3report.com (where's the traffic?) v5.0 is out! | http://www.FightThePatent.com | ICQ 52741957 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,229
|
erm...huh?
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Do Fun Shit.
Industry Role:
Join Date: Dec 2004
Location: OC
Posts: 13,393
|
I just realised trying to put that query together in my head... that since I'm thinking in smartys only right now, its time to sleep until my brain starts functioning properly again...
__________________
![]() “I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Aug 2003
Location: Austin, TX
Posts: 4,090
|
data analysis from my big database of spidering of websites. Fight the warehouse!
__________________
http://www.t3report.com (where's the traffic?) v5.0 is out! | http://www.FightThePatent.com | ICQ 52741957 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,229
|
I meant more as in 'Huh? What are you trying to do?' and to post an sql dump of your tables :P
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Join Date: Aug 2003
Location: Austin, TX
Posts: 4,090
|
Quote:
LOL.. i don't think i could upload 1+ TB here ![]() Doing some data mining that requires an inner join to the table to pull in linking relationship (its for what i call a T3flow in the t3report). I have it done right now as separate queries in perl, but wanted an elegant 1 sql query line to do the equivalent.. much like people when people those 1-liner perl contests. Fight the too many data!
__________________
http://www.t3report.com (where's the traffic?) v5.0 is out! | http://www.FightThePatent.com | ICQ 52741957 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Jun 2003
Location: My High Horse
Posts: 6,334
|
give me the schema of the tables involved and the sql you're using for starters that may give me an idea of what you are trying to accomplish here
barring that give me the schemas and tell me what you are trying to do.
__________________
Mike South It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: May 2003
Location: Earth.... I think?
Posts: 243
|
cake... ;-)))
Code:
select t1.url, t1.url_domain, t1.referer, t1.referer_domain, t2.referer, t2.referer_domain, t2.last_spidered from table t1, table t2 where t1.referer_domain = t2.domain
__________________
DreamerCafe.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Join Date: Aug 2003
Location: Austin, TX
Posts: 4,090
|
Quote:
the schema is very simple, you can see it from the snapshot: url text url_domain text referer text referer_domain text last_spidered date i provided 2 dummy data rows from the table. the task is to have an sql query that returns the columns/data listed in the output. the sql query would require an inner join Fight the query!
__________________
http://www.t3report.com (where's the traffic?) v5.0 is out! | http://www.FightThePatent.com | ICQ 52741957 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Join Date: May 2003
Location: Earth.... I think?
Posts: 243
|
look up ^^^
![]() what do i need for the T3report? it looks awesome. can't wait to try it. send here please : [email protected]
__________________
DreamerCafe.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Join Date: Aug 2003
Location: Austin, TX
Posts: 4,090
|
Quote:
without it, it was like a union sweet.. going to plug this into my code and run it against the production database to do real test against the big database. i'll hit you up in email. Fight the solution!
__________________
http://www.t3report.com (where's the traffic?) v5.0 is out! | http://www.FightThePatent.com | ICQ 52741957 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Aug 2003
Location: Austin, TX
Posts: 4,090
|
If anyone came up with a different sql query, feel free to post, i'll do runner up prizes
![]() Fight the you don't win second place, you lost first place!
__________________
http://www.t3report.com (where's the traffic?) v5.0 is out! | http://www.FightThePatent.com | ICQ 52741957 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Industry Role:
Join Date: Jun 2003
Location: My High Horse
Posts: 6,334
|
Quote:
LOL
__________________
Mike South It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 | |
Confirmed User
Join Date: Aug 2003
Location: Austin, TX
Posts: 4,090
|
Quote:
and here i thought you just filmed nudie ppl and posted rants against FSC. ![]() Fight the multi-talented!
__________________
http://www.t3report.com (where's the traffic?) v5.0 is out! | http://www.FightThePatent.com | ICQ 52741957 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Join Date: Oct 2007
Posts: 138
|
Code:
SELECT a.url, a.url_domain, a.referer, a.referer_domain, b.referer_domain AS referer2, b.referer AS referer_domain2, b.last_spidered FROM t1 AS a INNER JOIN t1 AS b ON b.url_domain = a.referer_domain WHERE 1 AND a.url_domain = 'a.com' ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 | |
Confirmed User
Join Date: Aug 2003
Location: Austin, TX
Posts: 4,090
|
Quote:
Fight the runner up!
__________________
http://www.t3report.com (where's the traffic?) v5.0 is out! | http://www.FightThePatent.com | ICQ 52741957 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |