# Query output to .csv

**URL:** <https://community.stardog.com/t/query-output-to-csv/2007>\
**Category:** Support\
**Created:** [October 14, 2019, 11:34am UTC](https://community.stardog.com/t/query-output-to-csv/2007 "2019-10-14T11:34:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shishir\_Singhal](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/shishir_singhal/32/494_2.png) [@Shishir\_Singhal](https://community.stardog.com/u/Shishir_Singhal)\
**Post date:** [October 14, 2019, 11:34am UTC](https://community.stardog.com/t/query-output-to-csv/2007/1 "2019-10-14T11:34:38Z")

</div>

Hi,  
How can I print the output of the query to .csv file using the command line?

--Thanks

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [October 14, 2019, 11:50am UTC](https://community.stardog.com/t/query-output-to-csv/2007/2 "2019-10-14T11:50:01Z")

</div>

`$> stardog query myDb -f CSV "select * where......"`

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [October 28, 2019, 11:50am UTC](https://community.stardog.com/t/query-output-to-csv/2007/3 "2019-10-28T11:50:03Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
