# HyperLEDA Query

**URL:** <https://discuss.legacysurvey.org/t/hyperleda-query/9533>\
**Category:** Site Feedback\
**Created:** [March 28, 2024, 4:46am UTC](https://discuss.legacysurvey.org/t/hyperleda-query/9533 "2024-03-28T04:46:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TriShotFlurry](https://discuss.legacysurvey.org/user_avatar/discuss.legacysurvey.org/trishotflurry/32/4082_2.png) [@TriShotFlurry](https://discuss.legacysurvey.org/u/TriShotFlurry)\
**Post date:** [March 28, 2024, 4:46am UTC](https://discuss.legacysurvey.org/t/hyperleda-query/9533/1 "2024-03-28T04:46:09Z")

</div>

I was trying to get a set of galaxies from the HyperLEDA Extragalactic Database (LEDA) and I need some help getting to it.

I need the following query:

```auto
SELECT
pgc,objname,objtype,al2000,de2000,type,bar,ring,multiple,compactness,t,agnclass,logd25,logr25,pa

FROM meandata
WHERE
objtype='G,g'

ORDER BY
no text

```

I got nothing, not even a single text. Also, the site is pretty hard because they never get the descriptions and query examples. I am confused. Any Help guys?

---

<div class="post-metadata">

**Author:** ![dstn](https://discuss.legacysurvey.org/user_avatar/discuss.legacysurvey.org/dstn/32/15_2.png) [@dstn](https://discuss.legacysurvey.org/u/dstn)\
**Post date:** [March 28, 2024, 11:51am UTC](https://discuss.legacysurvey.org/t/hyperleda-query/9533/2 "2024-03-28T11:51:48Z")

</div>

I don’t know anything about hyperLEDA specifically, but if you’re trying to select objtype = ‘G’ or ‘g’, then you want something like

objtype in (‘G’, ‘g’)

and I’m not sure what you’re trying to do with that “ORDER BY” statement, but I would either omit that, or ORDER BY one of the column names, like

ORDER BY objname

(eg)

> **[SQL IN Operator](https://www.w3schools.com/Sql/sql_in.asp)**
>
> The IN operator is used in the WHERE clause to check if a specified column's value matches any value within a provided list.

---

<div class="post-metadata">

**Author:** ![TriShotFlurry](https://discuss.legacysurvey.org/user_avatar/discuss.legacysurvey.org/trishotflurry/32/4082_2.png) [@TriShotFlurry](https://discuss.legacysurvey.org/u/TriShotFlurry)\
**Post date:** [March 28, 2024, 11:30pm UTC](https://discuss.legacysurvey.org/t/hyperleda-query/9533/3 "2024-03-28T23:30:07Z")

</div>

> [@dstn](#):
>
> objtype in (‘G’, ‘g’)

Just got an “Aw Snap!” error and I am still seeing how it works.

I’ve split the query into two sections - One for objtype=‘G’ and objtype=‘g’ and set the link to CSV, and it gives me one in-page and I’m trying to save it as a file, but before it finishes loading, I got the error. The objtype in (‘G’, ‘g’) doesn’t work.

Any idea on how to fix it?

---

<div class="post-metadata">

**Author:** ![TriShotFlurry](https://discuss.legacysurvey.org/user_avatar/discuss.legacysurvey.org/trishotflurry/32/4082_2.png) [@TriShotFlurry](https://discuss.legacysurvey.org/u/TriShotFlurry)\
**Post date:** [March 29, 2024, 3:58am UTC](https://discuss.legacysurvey.org/t/hyperleda-query/9533/4 "2024-03-29T03:58:49Z")

</div>

Okay, I fixed the error and I will download this query as .csv but for some reason, I don’t like the hours in decimal format (should be written as H:M:S D:M:S format. I am currently working on that.
