Hello!
This is a totally newbie DTD question. Let's say that I have the following XML:
<?xml version="1.0" encoding="utf-16"?>
<root>
<person>
<name>John Doe</name>
<pets>
<pet>
<name>Fluffy</name>
<type>cat</type>...
FANTASTIC!!
Your solution worked perfectly, except that some of the columns were duplicated in my results. It was pretty easy to solve though. Here's the final query. Thanks for teaching me about CROSS JOIN!
SELECT domains.domain,weeks.week, visitors
FROM ( SELECT DISTINCT domain...
...) AS weeks
LEFT OUTER
JOIN ...
Part of this works great and returns a list of dates and domains, but is missing the "visitors" data:
SELECT *
FROM (
SELECT DISTINCT domain
FROM domain_report
) AS domains
CROSS JOIN (
SELECT DISTINCT week
FROM domain_report
) AS weeks...
Hello,
I'm building a report for a client who wants to know how many visitors are reaching his site based on the domain name entered by the visitors. For instance, some visitors may type in "foo.domain.com","domain.com", or "mobile.domain.com". The report needs to be broken down by week and...
Hello!
Thank you for the responses. I have some follow up question. First, though, I wanted to clarify that fluffy is a cat, not a dog. :-)
Quite honestly, I can't make heads or tails of the ANSI compliant version. What's bi_stg_8.ti? Well, anyhow, I've been focused on this proposed...
Hello!
Say I have the following tables:
Pets
=====
id - integer (pk)
name - varchar
type - varchar
notes
=====
id - integer (pk)
pet_id - integer (fk)
note_text - text
date - date/time
I'd like to query for pets of type "dog", and I'd like the query to also return the most recent note...
Thanks mrdenny,
I was using outer joins because I wanted visitor rows to show up regardless if they were associated with a campaign. I'll see what happens if I count(ctokens.ctoken) instead. I must admit, although I can handle simple queries, these big ones are a mystery. Are there any good...
...the campaign name if it exists, or NULL otherwise.
In my previous example, I called the unique identifier "uuid", which is inconsistent with my *real* code. Just for completeness, I'll restate my real table structures:
visitors
========
visitor_id [int/pk]
client_id [int/fk]
ctoken...
I'll have to follow up tomorrow to be certain, but I think that's it! I'll have to read up on my inner joins to understand exactly what's going on.
Thanks!
- Bret
...--------
visitor_id
uuid
I have to write a query that shows me all visitors coming from a particular campaign. I've done it this way:
SELECT *
FROM visitors
WHERE visitor.uuid IN (
SELECT campaigns.uuid
FROM campaigns, tokens
WHERE tokens.campaign_id = campaigns.campaign_id
AND...
...than 2 times." I could programmatically tally the rows, but I thought I'd try doing it in the query. My attempt looked like this:
SELECT count(*)
FROM entry_point_marketing_data
WHERE visitor_id IN
(
SELECT visitor_id, Count(visitor_id) as number_of_visits
FROM...
Hello!
I'm trying to position a javascript tool-tip based on the position of a button. I found this code online for finding the y-offset of the button:
function findPosY(obj)
{
var curtop = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{...
theniteowl,
Thanks a ton for all of your help! I checked out Jemminger's form validation. Normally I'd totally use it, but at the moment I'm coding in coldfusion and his library and the cfform (coldfusion's form tag) don't play well together.
I was intrigued by his technique of using the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.