SQL select data from more than one table I've constructed a nice query in drupal 7: 

SELECT og.label AS title, og.gid AS gid 
FROM og
LEFT JOIN field_data_field_group_category 
  ON og.etid = field_data_field_group_category.entity_id
WHERE ( (field_data_field_group_category.field_group_category_value IN  ('1')) )
ORDER BY title ASC


This works but actually I want to remove the WHERE clause and instead put field_data_field_group_cat.field_group_category_value in my result. But when I try:

SELECT og.label AS title
  , og.gid AS gid 
  field_data_field_group_category.field_group_category_value AS cat 
FROM  og, field_data_field_group_category
LEFT JOIN field_data_field_group_category
  ON og.etid = field_data_field_group_category.entity_id
ORDER BY title ASC


This won't work.. How do I get a value of another table in the result object?

Greetings!
You second query is incorrect because you have the table field_data_field_group_category two times, so it would generates duplicates and there's a missing coma in your SELECT clause. If you want your column in the result without filtering it, just put it in the SELECT clause and that's it.

SELECT og.label AS title
  , og.gid AS gid
  , field_data_field_group_category.field_group_category_value AS cat 
FROM og
LEFT JOIN field_data_field_group_category 
  ON og.etid = field_data_field_group_category.entity_id
ORDER BY title ASC