Home > database >  More than about repeating field, data export one of the problems
More than about repeating field, data export one of the problems

Time:10-29

Ask you a question, I now have a ship AIS database, the same ship (MMSI) in addition to data recording time is different, the rest of the information, that is more than a MMSI corresponding data, I need to select how many ship (MMSI), a total of 3 million data, such a situation, what should I get, also did not learn before this, will read the books to learn the simple query and add or delete operation,

CodePudding user response:

Select count (*) from (select distinct MMSI from table) a
Be a bit slow SQL
Best to build the number of tables to save the ship

CodePudding user response:

Select count (MMSl) from table group by MMSl;
  • Related