登录
  • #数学|统计

最近‌‌‍‍‌‍‍‌‍‍‌‌‌‌‌‍‍‍‍‌‍‌‌‍‍‌‍‌‌‌‍‌面试遇到的几道SQL题,写好SQL还是很重要的。新人求加米

dynatang
1204
6
紧张,第二题就被卡住了。其实不难,下次再来

1. How many checkouts were there each week?

2. In which week were JK Rowling books most popular?

3. Which is the most popular book each month?

Schema

Table "public.library_checkouts"

Column | Type | Collation | Nullable | Default

------------------+-----------------------------+-----------+----------+---------

bibnumber | character varying | | |

itembarcode | character varying | | |

itemtype | character varying | | |

collection | character varying | | |

callnumber | character varying | | |

checkoutdatetime | timestamp without time zone | | |

Table "public.item_info"

Column | Type | Collation | Nullable | Default

-----------------+-------------------+-----------+----------+---------

bibnum | character varying | | |

title | character varying | | |

author | character varying | | |

isbn | character varying | | |

publicationyear | character varying | | |

publisher | character varying | | |

subjects | character varying | | |

itemtype | character varying | | |

itemcollection | character varying | | |

floatingitem | character varying | | |

itemlocation | character varying | | |

reportdate | character varying | | |

itemcount | character varying | | |
6条回复
热度排序

发表回复