-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a query that runs in less than 1 ms:
SELECT
product_to_value.category AS category,
features.name AS featurename,
featurevalues.name AS valuename
FROM
product_to_value,
features,
featurevalues
WHERE
product_to_value.category IN(:int, :bla, :bla1)
…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I know that mySQL 5.x does not support INTERSECT, but that seems to be what I need.
Table A: Products (p_id)
Table B: Prod_cats (cat_id) - category info (name, description, etc)
Table C: prod_2cats (p_id, cat_id) - many to many
prod_2cats holds the many (1 or more) categories that have been assigned…
>>> More
-
as seen on SQL Blogcasts
- Search for 'SQL Blogcasts'
This one is mainly a personal reminder but I hope it helps somebody else too. Let's say you have a table that covers something like currency exchange rates with columns for the start and end dates of the period each rate was applicable. Now you need to list the rates that applied during the year…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
In SQL, the name Join gives an idea of "merging" or a sense of "union", making something bigger. But in fact, as in the other post
http://stackoverflow.com/questions/2706051/in-sql-a-join-is-actually-an-intersection-and-it-is-also-a-linkage-or-a-sidew
it turns out that a Join (Inner Join) is actually…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I've got a list of lists which I want to intersect:
List<List<int>> input = new List<List<int>>();
input.Add(new List<int>() { 1, 2, 4, 5, 8 });
input.Add(new List<int>() { 3, 4, 5 });
input.Add(new List<int>() { 1, 4, 5, 6 });
Output should be
{ 4, 5…
>>> More