title: C# SQL Query for Hiding Multiple String And Showing The First Line With The Same Identifier
body: <p>I'm trying to create a report using datagrid in C# where it will show the multiple data but will hide the identifier if they have the same value in the table.</p>
  
  <p>The results should be something like this
  <img src="https://i.imgur.com/TzrAYJg.png"></p>
  
  <p>Here's my code and query in fetching the data in the database.</p>
  
  <pre><code>//Seperated public class
  public DataTable ViewDailyRecord(BELReport belreport) {
          SqlCommand cmd = new SqlCommand();
          cmd.Connection = dbcon.getcon();
          cmd.CommandType = CommandType.Text;
          cmd.CommandText = "SELECT * FROM ReportStorageDetails WHERE Date=@Date";
          cmd.Parameters.AddWithValue("@Date",belreport.DailyReport);
  
          SqlDataReader dr = cmd.ExecuteReader();
          DataTable table = new DataTable();
          table.Load(dr);
  
          return table;
  }
  
  // Code inside my form
  belreport.DailyReport = Convert.ToDateTime(date_day_Daily.Text).ToString("yyyy-MM-dd");
  
  DataTable table = balreport.ViewDailyRecord(belreport);
  
  dgv_daily.DataSource = table;
  </code></pre>
  
  <p>Thank you in advance.</p>